That's the same exactly problem I'm having and I'm not using JBOSS.  In fact
I posted this question under subject:"JDO Mapping Problem".

I'm using long transaction where I implement the TimeStampable interface.

I tried with autostore false and true but no cigar.  I'll try out a couple
of other things I read from this thread.

good luck to both of us.

-----Original Message-----
From: Jacek Kruszelnicki [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 4:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Castor behaves differently within JBoss


I meant : old object = exists in the database

Here is the code snippet from my other post from a few minutes ago...
I only get exception (about duplicate objects) when trying to commit, not
sooner
(with autostore = true)

try {
t = new Test(70);
// company id=30 already exists in the DB, we just want to fetch it for
reference
Company co = (Company) pm.findByPrimaryKey(test.Company.class, new
Integer(30));
t.setOwnerCompany(co);
System.out.println("Co ++ " + co);
System.out.println("test " + t);
pm.create(t);
}
catch (Exception ex) {



-- Jacek


At 12:50 PM 11/21/2001 -0800, you wrote:
>See inline.
>
>
>
>-----Original Message-----
> >From: Jacek Kruszelnicki [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, 22 November 2001 9:14 a.m.
> >To: [EMAIL PROTECTED]
> >Subject: Re: [castor-dev] Castor behaves differently within JBoss
> >
> >
> >OK, for now I set autostore to false in the MBean configuration.
> >So I can now create a new object and refer it to an existing object -
ONLY
>
>The old object is not an existing object in the Castor world. It is only
>something outside the atmosphere.
>It is a mis-use. You should load the object again via Castor.
>Or, use long transaction update to made Castor aware of the out-of-space
>object.
>
>
>
>Thomas
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

Jacek Kruszelnicki
Numatica Corporation
E-mail: [EMAIL PROTECTED]
Phone: (781) 756 8064

-----------------------------------------------------------
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