[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix, GDL2, EORelationship (-validateName:)
From: |
David Ayers |
Subject: |
Re: Fix, GDL2, EORelationship (-validateName:) |
Date: |
Tue, 29 Apr 2008 08:56:00 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.9 (X11/20080110) |
Hello Georg,
Thanks for the report!
Georg Fleischmann schrieb:
> here is a patch for EORelationship, proposing a fix for awakening of
> attributes that have a definition.
>
> When relationships are constructed they are validated against
> attributes. That in turn awakens the attributes, being dependent on
> relationships that are not there at this time. The definitions will fail
> to be set.
> Here is the part of the stack of that problematic dependency:
OK, we have a bug. We are working out a test case for the test suite.
> The attached patch (-c) is fixing the issue by simply not validating the
> relationships against attributes.
> This seems to be correct behaviour, since the class documentation
> doesn't mention a test against attributes, only against relationships
> and stored procedures. Quote from the EOAccess docu:
>
> validateName:
> "Validates name and returns nil if its a valid name, or an exception if
> it isn’t. A name is invalid if it has zero
> length; starts with a character other than a letter, a number, or “@”,
> “#”, or “_”; or contains a character other
> than a letter, a number, “@”, “#”, “_”, or “$”. A name is also invalid
> if the receiver’s EOEntity already has
> an EORelationship with the same name, or if the model has a stored
> procedure that has an argument with
> the same name."
I'm not sure. Matt has been doing a lot of work with respect to
validation, especially in conjunction with DBModeler. I'd rather like
to give him a chance to handle it.
Thanks!
David