diff --git a/ChangeLog b/ChangeLog index e8a5659..8cb3481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-06-06 David Ayers + * EOAccess/EOAttribute.m (-setDefinition:): Clear _columnName before + calling _setIsEdited on the parent. Document. * EOAccess/EORelationship.h/m (-setInverseRelationship:): Rename to... (-_setInverseRelationship:): ... and move to local privat method. diff --git a/EOAccess/EOAttribute.m b/EOAccess/EOAttribute.m index 23fd166..0720e42 100644 --- a/EOAccess/EOAttribute.m +++ b/EOAccess/EOAttribute.m @@ -863,14 +863,24 @@ return nexexp return definition; } +/** + *

Sets the definition of a derived attribute.

+ *

An EOAttribute can either reference column from the entites + * external representation or define a derived attribute such a + * cacluclated value or a key path. The values to these attributes + * are cached in memory.

+ *

To set the definition of an attribute, the attribute must + * already be contained by its parent entity.

+ *

Setting the the definition clears the column name.

+ */ - (void)setDefinition:(NSString *)definition { if(definition) { [self willChange]; [self _setDefinitionWithoutFlushingCaches: definition]; + DESTROY(_columnName); [_parent _setIsEdited]; - DESTROY(_columnName);//?? } }