I searched the mail archives and found a couple of
people had posted problems with persisting JDO
relationships.  Since I didn't see any answers, and
I'm having the same problem others have had I thought
I'd post this again in hopes of an answer from exolab
or a work around from someone who has face this
problem before.

Although I have a number of relationships, I've
included the log/stack trace for a *simple* one.  I've
registered a log4j callbackinterceptor to log all
messages in the CallbackInterceptor interface.

A TimeEntry has a Comment both extend generated
classes which in turn extend a single superclass
(AbstractBusinessObject).

Thoughts?  Please!

May-30-2002 11:30:08:634 PM, PDT [DEBUG]
(GeneratedTimeEntry:) -- Searching for
GeneratedTimeEntry :-20
May-30-2002 11:30:08:634 PM, PDT [INFO ]
(GeneratedTimeEntry:) -- query SELECT object FROM
GeneratedTimeEntry object WHERE id = $1
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO using: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
made persistent using Database
'org.exolab.castor.jdo.engine.DatabaseImpl@5ab859:chronos'
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO loaded:
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
loaded from persistent storage with accessMode '1'
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO using: object
'GeneratedTimeEntry: id=-20 timesheetId=-1
projectId=-1 personId=-1 startDate=Sat May 25 14:00:00
PDT 2002 endDate=Sat May 25 16:00:00 PDT 2002
linkId=-20 billingTypeId=1 durationInMinutes=null
description=GeneratedComment: id=-20 linkId=-20
text=Test time Entry date=2002-05-05
commenterPersonId=-1' has been made persistent using
Database
'org.exolab.castor.jdo.engine.DatabaseImpl@5ab859:chronos'
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO loaded:
'GeneratedTimeEntry: id=-20 timesheetId=-1
projectId=-1 personId=-1 startDate=Sat May 25 14:00:00
PDT 2002 endDate=Sat May 25 16:00:00 PDT 2002
linkId=-20 billingTypeId=1 durationInMinutes=null
description=GeneratedComment: id=-20 linkId=-20
text=Test time Entry date=2002-05-05
commenterPersonId=-1' has been loaded from persistent
storage with accessMode '1'
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(com.apex.tools.castor.Log4jCallbackInterceptor:) --
JDO storing: object 'GeneratedTimeEntry: id=-20
timesheetId=-1 projectId=-1 personId=-1 startDate=Sat
May 25 14:00:00 PDT 2002 endDate=Sat May 25 16:00:00
PDT 2002 linkId=-20 billingTypeId=1
durationInMinutes=null description=GeneratedComment:
id=-20 linkId=-20 text=Test time Entry date=2002-05-05
commenterPersonId=-1' is to be stored in persistent
storage (modified 'false')
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO storing: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' is to be
stored in persistent storage (modified 'false')
May-30-2002 11:30:08:764 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO releasing: object
'GeneratedTimeEntry: id=-20 timesheetId=-1
projectId=-1 personId=-1 startDate=Sat May 25 14:00:00
PDT 2002 endDate=Sat May 25 16:00:00 PDT 2002
linkId=-20 billingTypeId=1 durationInMinutes=null
description=GeneratedComment: id=-20 linkId=-20
text=Test time Entry date=2002-05-05
commenterPersonId=-1' has been made transient
(committed 'true')
May-30-2002 11:30:08:774 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO releasing: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
made transient (committed 'true')
May-30-2002 11:30:08:794 PM, PDT [DEBUG]
(GeneratedComment:) -- Searching for GeneratedComment
:-20
May-30-2002 11:30:08:794 PM, PDT [INFO ]
(GeneratedComment:) -- query SELECT object FROM
GeneratedComment object WHERE id = $1
May-30-2002 11:30:08:834 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO using: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
made persistent using Database
'org.exolab.castor.jdo.engine.DatabaseImpl@33278a:chronos'
May-30-2002 11:30:08:834 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO loaded:
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
loaded from persistent storage with accessMode '1'
May-30-2002 11:30:08:834 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO storing: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' is to be
stored in persistent storage (modified 'false')
May-30-2002 11:30:08:834 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO releasing: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
made transient (committed 'true')
May-30-2002 11:30:08:854 PM, PDT [INFO ] (TimeEntry:)
-- Castor database is not active...Initiating Castor
transaction.
May-30-2002 11:30:08:854 PM, PDT [DEBUG] (TimeEntry:)
-- >>> Update -20<<<
May-30-2002 11:30:08:854 PM, PDT [INFO ] (TimeEntry:)
-- preUpdate called
May-30-2002 11:30:08:854 PM, PDT [DEBUG] (TimeEntry:)
-- loading dependant Comment object...
May-30-2002 11:30:08:854 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO using: object
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
made persistent using Database
'org.exolab.castor.jdo.engine.DatabaseImpl@49f997:chronos'
May-30-2002 11:30:08:854 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO loaded:
'GeneratedComment: id=-20 linkId=-20 text=Test time
Entry date=2002-05-05 commenterPersonId=-1' has been
loaded from persistent storage with accessMode '1'
May-30-2002 11:30:08:854 PM, PDT [DEBUG] (TimeEntry:)
-- class TimeEntry #-20 is not part of a
transaction...loading!
May-30-2002 11:30:08:914 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO using: object
'GeneratedTimeEntry: id=-20 timesheetId=-1
projectId=-1 personId=-1 startDate=Sat May 25 14:00:00
PDT 2002 endDate=Sat May 25 16:00:00 PDT 2002
linkId=-20 billingTypeId=1 durationInMinutes=null
description=GeneratedComment: id=-20 linkId=-20
text=Test time Entry date=2002-05-05
commenterPersonId=-1' has been made persistent using
Database
'org.exolab.castor.jdo.engine.DatabaseImpl@49f997:chronos'
May-30-2002 11:30:08:914 PM, PDT [INFO ]
(Log4jCallbackInterceptor:) -- JDO loaded:
'GeneratedTimeEntry: id=-20 timesheetId=-1
projectId=-1 personId=-1 startDate=Sat May 25 14:00:00
PDT 2002 endDate=Sat May 25 16:00:00 PDT 2002
linkId=-20 billingTypeId=1 durationInMinutes=null
description=GeneratedComment: id=-20 linkId=-20
text=Test time Entry date=2002-05-05
commenterPersonId=-1' has been loaded from persistent
storage with accessMode '1'
May-30-2002 11:30:08:914 PM, PDT [ERROR]
(SystemException:) -- Unable to save object of
typeclass TimeEntry with id=-20!
org.exolab.castor.jdo.DuplicateIdentityException:
update object which is already in the transaction
        at
org.exolab.castor.persist.TransactionContext.markUpdate(TransactionContext.java:915)
        at
org.exolab.castor.persist.TransactionContext.update(TransactionContext.java:991)
        at
org.exolab.castor.jdo.engine.DatabaseImpl.update(DatabaseImpl.java:353)
        at
AbstractBusinessObject.update(AbstractBusinessObject.java:378)
        at AbstractBusinessObject.save(AbstractBusinessObject.java:314)

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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

Reply via email to