* EOAccess/EOStoredProcedure.m (initWithPropertyList:owner:),

(encodeIntoPropertyList:): Change key from attributes to arguments.
* EOAccess/EOAttribute.m (initWithPropertyList:owner:):
Handle parameter direction being a string containing a number.
Use boolValue instead of comparing against Y.
* EOAccess/Entity.m (encodeIntoPropetyList:): Encode flags as
strings.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26415 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ratmice 2008-03-31 16:03:16 +00:00
parent 2526cef21a
commit d65675bd7c
4 changed files with 40 additions and 30 deletions

View file

@ -1,3 +1,13 @@
2008-03-31 Matt Rice <ratmice@gmail.com>
* EOAccess/EOStoredProcedure.m (initWithPropertyList:owner:),
(encodeIntoPropertyList:): Change key from attributes to arguments.
* EOAccess/EOAttribute.m (initWithPropertyList:owner:):
Handle parameter direction being a string containing a number.
Use boolValue instead of comparing against Y.
* EOAccess/Entity.m (encodeIntoPropetyList:): Encode flags as
strings.
2008-03-30 David Ayers <ayers@fsfe.org>
* EOControl/EOQualifier.m (getKey): Fix parsing of '%%'

View file

@ -113,16 +113,11 @@ RCS_ID("$Id$")
[self setParent: owner];
[self setName: [propertyList objectForKey: @"name"]];
EOFLOGObjectLevelArgs(@"gsdb", @"Attribute parent=%p %@",
owner, [(EOEntity *)owner name]);
// EOFLOGObjectLevel(@"gsdb", @"Attribute Entity=%@", [self entity]);
[self setExternalType: [propertyList objectForKey: @"externalType"]];
tmpString = [propertyList objectForKey: @"allowsNull"];
if (tmpString)
[self setAllowsNull: [tmpString isEqual: @"Y"]];
[self setAllowsNull: [tmpString boolValue]];
[self setValueType: [propertyList objectForKey: @"valueType"]];
[self setValueClassName: [propertyList objectForKey: @"valueClassName"]];
@ -198,23 +193,17 @@ RCS_ID("$Id$")
tmpString = [propertyList objectForKey: @"parameterDirection"];
if (tmpString)
{
if ([tmpString isKindOfClass: GDL2_NSNumberClass])
{
[self setParameterDirection: [tmpString intValue]];
}
else
{
EOParameterDirection eDirection = EOVoid;
EOParameterDirection tmpDir = [tmpString intValue];
EOParameterDirection eDirection = EOVoid;
if ([tmpString isEqual: @"in"])
eDirection = EOInParameter;
else if ([tmpString isEqual: @"out"])
eDirection = EOOutParameter;
else if ([tmpString isEqual: @"inout"])
eDirection = EOInOutParameter;
if ([tmpString isEqual: @"in"] || tmpDir == EOInParameter)
eDirection = EOInParameter;
else if ([tmpString isEqual: @"out"] || tmpDir == EOOutParameter)
eDirection = EOOutParameter;
else if ([tmpString isEqual: @"inout"] || tmpDir == EOInOutParameter)
eDirection = EOInOutParameter;
[self setParameterDirection: eDirection];
}
[self setParameterDirection: eDirection];
}
tmpObject = [propertyList objectForKey: @"userInfo"];
@ -239,13 +228,9 @@ RCS_ID("$Id$")
if (tmpString)
[self setDocComment: tmpString];
EOFLOGObjectLevelArgs(@"gsdb", @"Attribute name=%@", _name);
tmpString = [propertyList objectForKey: @"isReadOnly"];
EOFLOGObjectLevelArgs(@"gsdb", @"tmpString=%@", tmpString);
[self setReadOnly: [tmpString isEqual: @"Y"]];
EOFLOGObjectLevelArgs(@"gsdb", @"tmpString=%@", tmpString);
[self setReadOnly: [tmpString boolValue]];
}
return self;

View file

@ -457,13 +457,19 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
if (_docComment)
[propertyList setObject: _docComment
forKey: @"docComment"];
if (_batchCount)
[propertyList setObject: [NSNumber numberWithInt: _batchCount]
[propertyList setObject: [NSString stringWithFormat:@"%d", _batchCount]
forKey: @"maxNumberOfInstancesToBatchFetch"];
if (_flags.cachesObjects)
[propertyList setObject: [NSNumber numberWithBool: _flags.cachesObjects]
[propertyList setObject: @"Y"
forKey: @"cachesObjects"];
if (_flags.isAbstractEntity)
[propertyList setObject: @"Y"
forKey: @"isAbstractEntity"];
if (_parent)
[propertyList setObject: [_parent name]
forKey: @"parent"];

View file

@ -92,7 +92,16 @@ RCS_ID("$Id$")
if (!_userInfo)
[self setUserInfo:[propertyList objectForKey:@"userInfo"]];
array = [propertyList objectForKey:@"attributes"];
array = [propertyList objectForKey:@"arguments"];
if (!array)
{
array = [propertyList objectForKey:@"attributes"];
if (array)
{
NSLog(@"warning found 'attributes' key in property list you should"
@"fix your model files to use the 'arguments' key!!");
}
}
if ([array count])
{
_arguments = [[NSMutableArray alloc] initWithCapacity: [array count]];
@ -156,7 +165,7 @@ RCS_ID("$Id$")
[attributesPList addObject: attributePList];
}
[propertyList setObject: attributesPList forKey: @"attributes"];
[propertyList setObject: attributesPList forKey: @"arguments"];
}
}