* GNUmakefile.in: Add Trading subproject.

* EOAccess/EORelationship.m (-_joinsChanged:): Set the destination to
the first object.
(-destinationEntity): Call _joinsChanged if the destination is nil.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@27916 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ratmice 2009-02-18 14:47:26 +00:00
parent 9b2f510830
commit 313fd199b3
3 changed files with 19 additions and 19 deletions

View file

@ -1,3 +1,10 @@
2009-02-18 Matt Rice <ratmice@gmail.com>
* GNUmakefile.in: Add Trading subproject.
* EOAccess/EORelationship.m (-_joinsChanged:): Set the destination to
the first object.
(-destinationEntity): Call _joinsChanged if the destination is nil.
2009-02-18 David Ayers <ayers@fsfe.org>
* EOControl/Makefile.postamble

View file

@ -561,6 +561,11 @@ destination entity of the last relationship in definition. **/
NSAssert3(destinationEntity, @"No destinationEntity in last relationship: %@ of relationship %@ in entity %@",
lastRelationship, self, [_entity name]);
}
else
{
[self _joinsChanged];
destinationEntity = _destination;
}
}
else if ([destinationEntity isKindOfClass: [NSString class]] == YES)
destinationEntity = [[_entity model]
@ -2314,38 +2319,26 @@ dst entity primaryKeyAttributeNames
- (void) _joinsChanged
{
//TODO VERIFY
int count;
//VERIFIED DA
int count = [_joins count];
EOFLOGObjectFnStart();
count = [_joins count];
EOFLOGObjectLevelArgs(@"EORelationship", @"_joinsChanged:%@\nin %@", _joins, self);
if (count > 0)
{
int i;
EOJoin *join = [_joins objectAtIndex: 0];
EOAttribute *destinationAttribute = [join destinationAttribute];
EOEntity *destinationEntity = [destinationAttribute entity];
for (i = 0; i < count; i++)
{
EOJoin *join = [_joins objectAtIndex: i];
EOAttribute *destinationAttribute = [join destinationAttribute];
EOEntity *destinationEntity = [destinationAttribute entity];
_destination = destinationEntity;
}
_destination = destinationEntity;
}
else
{
_destination = nil;
}
//_joins count
//[self notImplemented:_cmd]; // TODO-NOW
/*
join destinationAttribute
attr entity
*/
EOFLOGObjectFnStop();
}

View file

@ -39,7 +39,7 @@ SVN_BASE_URL=http://svn.gna.org/svn/gnustep/libs
SUBPROJECTS = EOControl EOAccess EOAdaptors Tools
ifeq ($(GUI_MAKE_LOADED),yes)
SUBPROJECTS += EOInterface EOModeler DBModeler @GUI_SUBPROJECTS@
SUBPROJECTS += EOInterface EOModeler DBModeler Trading @GUI_SUBPROJECTS@
endif
ifeq ($(GUI_LIB),apple)
SUBPROJECTS += EOInterface EOModeler DBModeler Trading @GUI_SUBPROJECTS@