• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
OneToOne-Relation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OneToOne-Relation


  • Subject: OneToOne-Relation
  • From: Frank Gibau <email@hidden>
  • Date: Mon, 15 Mar 2004 09:04:13 +0100

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.


  • Follow-Ups:
    • Re: OneToOne-Relation
      • From: Chuck Hill <email@hidden>
  • Prev by Date: What is this all about??
  • Next by Date: RE: Weird WOComponentDefinition error
  • Previous by thread: What is this all about??
  • Next by thread: Re: OneToOne-Relation
  • Index(es):
    • Date
    • Thread