Lucky for me I just started using Subversion the other week ;)

I did the comparison and both models are the same.

Chuck I was calling a parent object that had a to-one relationship that was creating child objects for me automatically then I was creating duplicates which was one of my problems. I'm just happy it works now spent  too many days trying to migrate this DB.

Also for future reference  it seems the drivers for oracle 9 work okay  "DRIVER_VER" = "9.2.0.5.0"  


Regards
Dave

On 20/03/2006, at 3:20 PM, wojingo wrote:

Chuck Hill wrote:
On Mar 19, 2006, at 7:09 PM, Dave Elsner wrote:
Update FYI:

I solved this problem it was to do with the model ( Chuck was right  once again ).  I fixed it by turning off propagates primary key and  owns destination for all relationships. Thanks to all that helped.
I don't see how this caused the exception below, but if you have  propagates primary key set on to-one, EOF will create the related  object for  you when the main object is created.  If you then create  the related object (again!) in code, an empty object will be left  floating in the editing context.  This will cause exceptions when  saveChanges is called, but I've not see the one you report below.   And that does not explain why the same code worked with Openbase.   Curious...
Chuck

I was thinking the same thing... Maybe just editing and resaving the file changed something else aswell.
You could do a svn diff on the eomodels plist file, if your using version control - and of course as _we all know_ you should be!  :)




On 17/03/2006, at 5:06 PM, Dave Elsner wrote:

Hi,

In the process of migrating all the data from one of our Openbase  8 DB to Oracle 9.

To do this I cloned the original EOModel and changed the cloned  model to point to the new Oracle 9 DB, and changed all the column  data type to the appropriate kind.  e.g.  char > VARCHAR2  , text  > CLOB, etc

I then run my code

EOEnterpriseObject oldObject =  (EOEnterpriseObject) anEnumerator.nextElement();
EOEnterpriseObject newObject =  EOUtilities.createAndInsertInstance (anEditingContext, aNewEntityName);
newObject.takeValuesFromDictionary( (NSDictionary) oldObject.valuesForKeys(oldObject.attributeKeys()) );
       This works fine for all tables in the DB and all rows until it  reaches a CLOB item and I get the following error:

evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "INSERT INTO EXTERN_DTLS(personID,  currentPositions, biography, qualifications, awards,  professionalActivites, researchInterests) VALUES (?, EMPTY_CLOB(),  NULL, EMPTY_CLOB(), NULL, NULL, EMPTY_CLOB())" withBindings: 1:2020 (personID)>
 <main>  evaluateExpression:  <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT  t0.currentPositions, t0.qualifications, t0.researchInterests FROM  EXTERN_DTLS t0 WHERE t0.personID = ? FOR UPDATE" withBindings:  1:2020(personID)>
<main> fetch canceled
main> 1 row(s) processed
 <main>  === Rollback Internal Transaction
EXCEPTION:
com.webobjects.foundation.NSKeyValueCoding$Null

I have been stuck on this for a long time and am running out of  ideas?  All columns in the table allow for null values apart from  personID that is set to 2020

I've tried changing the CLOB to BLOB and   the java class to  String and NSData but still no luck?
Could it be a plug in problem? my java/extensions has  classes12.zip  and ojdbc14.jar   for oracle drivers


Thanks
Dave
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to