* EOAccess/EOExpressionArray.m (-[valueForSQLExpression:):

Use _infix instead of @"." and skip if _infix is not set.
	* EOAccess/EOSQLExpression
	([EOSQLExpression-prepareSelectExpressionWithAttributes:]):
	Set listString for "flattened attributes" for aggregate definitions.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@28408 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2009-07-24 17:11:50 +00:00
parent e44cedc7e7
commit db5eb46585
3 changed files with 24 additions and 4 deletions

View file

@ -14,6 +14,12 @@
(-[schemaBasedQualifierWithRootEntity:]): Ditto.
(-[sqlStringForSQLExpression:]): Ditto.
(-[dealloc]): Ditto.
* EOAccess/EOExpressionArray.m (-[valueForSQLExpression:):
Use _infix instead of @"." and skip if _infix is not set.
* EOAccess/EOSQLExpression
([EOSQLExpression-prepareSelectExpressionWithAttributes:]):
Set listString for "flattened attributes" for aggregate definitions.
2009-06-01 Georg Fleischmann <g.fleischmann@vhf.de>

View file

@ -365,8 +365,8 @@ if it's a string return NO
relValue = [obj valueForSQLExpression: sqlExpression];
if (i > 0)
[value appendString: @"."];
if (i > 0 && _infix)
[value appendString: _infix];
[value appendString: relValue];
}

View file

@ -684,9 +684,23 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
{
EOAttribute *attribute = [attributes objectAtIndex: i];
/* Add non-relationship definitions such as aggregates. */
if ([attribute isFlattened])
{
NSEmitTODO(); //TODO???
{
NSMutableString *listString = [self listString];
NSString *definition = [attribute definition];
if (definition)
{
NSRange range = [definition rangeOfString:@"."];
if (range.length == 0)
{
[self appendItem: definition
toListString: listString];
}
}
EOFLOGObjectLevelArgs(@"EOSQLExpression", @"flattened attribute=%@",
attribute);
}