Newbie: DataObject declaration and commit

From: Andrea Borgogelli Avveduti (borgogell..otmail.com)
Date: Thu Dec 15 2005 - 08:23:31 EST

  • Next message: Claudio Rosati: "R: cache synchronization"

    // Example (not real code):
     
    .....
    public MyCayenneDataClass myCayenneDataObject;
    .....
    MyCayenneDataClass myCayenneDataObject2= ( MyCayenneDataClass ) dataContext.createAndRegisterNewObject( MyCayenneDataClass.class );
    .....
    datacontext.commitChanges();
     
     
    // Question is:
     
    /*
     
    Why the Cayenne try to insert to records in the DB. I don't want to insert myCayenneDataObject but only myCayenneDataObject2. I'd like to use the first object only for temporary data.
    So what's the difference between the two object decalrations ?
     
    Thank you all for any help
     
    Andrea.
     
    */



    This archive was generated by hypermail 2.0.0 : Thu Dec 15 2005 - 08:23:32 EST