Re: OneToOne-Relation
Re: OneToOne-Relation
- Subject: Re: OneToOne-Relation
- From: Chuck Hill <email@hidden>
- Date: Mon, 15 Mar 2004 14:38:19 -0800
The ValueType in
{
columnName = INVENTARID;
externalType = int;
name = inventarid;
precision = 11;
valueClassName = NSNumber;
valueType = l;
},
Should be a lower case i. I'm not sure that is the problem though.
What does the Java look like?
Chuck
On Mar 15, 2004, at 12:04 AM, Frank Gibau wrote:
Hi,
I try to get a one to one Relation to work. The relation is optional.
When I create a new record, I am able to create this record with or
without relation. The problem occurs after a search. If I try to add a
relation to a existing record I got the following error:
Whats wrong ??
Does anybody have code thats works ?
Thanks
Frank
This is the description of the table:
{
attributes = (
{
allowsNull = Y;
columnName = "CREATION_DATE";
externalType = date;
name = creationDate;
valueClassName = NSCalendarDate;
valueType = D;
},
{
allowsNull = Y;
columnName = CREATOR;
externalType = varchar;
name = creator;
valueClassName = NSString;
valueType = S;
width = 30;
},
{
columnName = INVENTARID;
externalType = int;
name = inventarid;
precision = 11;
valueClassName = NSNumber;
valueType = l;
},
{
allowsNull = Y;
columnName = "MODIFICATION_DATE";
externalType = date;
name = modificationDate;
valueClassName = NSCalendarDate;
valueType = D;
},
{
allowsNull = Y;
columnName = "MODIFIED_BY";
externalType = varchar;
name = modifiedBy;
valueClassName = NSString;
valueType = S;
width = 30;
},
{
allowsNull = Y;
columnName = NAME;
externalType = varchar;
name = name;
valueClassName = NSString;
valueType = S;
width = 80;
},
{
allowsNull = Y;
columnName = NOTICE;
externalType = blob;
name = notice;
valueClassName = NSData;
width = 65535;
}
);
attributesUsedForLocking = (inventarid);
className = "de.jvm.eo.inventar.Inventar";
classProperties = (creationDate, creator, modificationDate,
modifiedBy, name, notice, computer);
externalName = INVENTAR;
fetchSpecificationDictionary = {};
name = Inventar;
primaryKeyAttributes = (inventarid);
relationships = (
{
deleteRule = EODeleteRuleCascade;
destination = Computer;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = inventarid;
sourceAttribute = inventarid; });
name = computer;
}
);
}
This is the error:
Error:
java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in
com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; _entity
= "Computer"; _newRow = {notice = ; name = ; inventarid = ; }; _object
= "{values = {notice = ; name = ; }; this = ""; }"; _globalID =
_EOIntegralKeyGlobalID[Computer (java.lang.Long)28]; _databaseOperator
= "EODatabaseUpdateOperator"; } does not contain value for attribute
named inventarid with snapshot key: inventarid
Reason:
rowDiffsForAttributes: snapshot in
com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; _entity
= "Computer"; _newRow = {notice =
<com.webobjects.foundation.NSKeyValueCoding$Null>; name =
<com.webobjects.foundation.NSKeyValueCoding$Null>; inventarid =
<com.webobjects.foundation.NSKeyValueCoding$Null>; }; _object =
"{values = {notice = <com.webobjects.foundation.NSKeyValueCoding$Null>;
name = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this =
"<de.jvm.eo.inventar.Computer 4f8a87 _EOIntegralKeyGlobalID[Computer
(java.lang.Long)28]>"; }"; _globalID = _EOIntegralKeyGlobalID[Computer
(java.lang.Long)28]; _databaseOperator = "EODatabaseUpdateOperator"; }
does not contain value for attribute named inventarid with snapshot
key: inventarid
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.