Once again Lincoln, it would help greatly if you posted a mapping file.  Do your 
objects have auto-generated sequential ids?  What are you calling db.create on?  The 
objects or the object graph?  What's the relationship between them?

Even if its another transaction, if you try to create an object with the same id, you 
will get a duplicate identity exception.

Please provide additional information so that I can assist.

-----Original Message-----
From: Lincoln Spiteri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Improving Auto store functionality


The problem arises when you have objects that are loaded in one
transaction and used in an object graph that is being created in a
second transaction. Although the object loaded has timstampable it will
be re-created when you call db.create in the secon transaction. If an
object has an Id and is timestamped you should not have to load it
explicitly in the second transaction when invoking db.create.

Lincoln

-----Original Message-----
From: Techeira, Vincent X -ND [mailto:[EMAIL PROTECTED]

Sent: 12 March 2003 15:25
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Improving Auto store functionality


If the additional object you are storing are already persisted in the
database, they should have the same id's and thus you are not
re-creating the objects.  If they have different id's then you should
associate the one in the database to ensure your not re-creating it.

Perhaps, I didn't understand you correctly.  Could you please send your
mapping file and an example.

Vincent

-----Original Message-----
From: Lincoln Spiteri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:35 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Improving Auto store functionality


Hi,

I have tried to use auto store on an object graph that contains
references to objects that are already persisted in the DB. When
persisting this object graph the already persisted objects are
re-created. Is there a way to stop this?

Regards

Lincoln 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to