RE: Temporary ID hasn't been replaced on commit

2012-03-16 Thread cghersi
: lunedì 12 marzo 2012 12:18 To: cghersi Subject: Re: Temporary ID hasn't been replaced on commit Are you using one datacontext for the entire application? Generally, you want one datacontext per user, or even one datacontext per request, depending on your use-case. The exception is a "

Re: Temporary ID hasn't been replaced on commit

2012-03-12 Thread Robert Zeigler
e.cayenne.access.DataContext.flushToParent(DataContext.java:1106) > > at org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1045) > > > > > > This issue is really driving me crazy!! > > Please, let me know what I’m doing wrong… > > > &

RE: Temporary ID hasn't been replaced on commit

2012-03-12 Thread cghersi
!! Please, let me know what I’m doing wrong… Thank you very much Best cghersi From: Cristiano Ghersi [mailto:cristiano.ghe...@abodata.com] Sent: lunedì 12 marzo 2012 10:01 To: 'Andrus Adamchik [via Cayenne]' Subject: RE: Temporary ID hasn't been replaced on commit

RE: Temporary ID hasn't been replaced on commit

2012-03-12 Thread cghersi
only to a single table? Thank you very much. Best cghersi From: Andrus Adamchik [via Cayenne] [mailto:ml-node+s195n3813176...@n3.nabble.com] Sent: venerdì 9 marzo 2012 17:41 To: cghersi Subject: Re: Temporary ID hasn't been replaced on commit Sorry this is Cayenne 3.1 API, and

Re: Temporary ID hasn't been replaced on commit

2012-03-09 Thread Andrus Adamchik
ample of use? > > > > Thank you very much. > > Best > > cghersi > > > > From: Andrus Adamchik [via Cayenne] > [mailto:ml-node+s195n3812833...@n3.nabble.com] > Sent: venerdì 9 marzo 2012 15:40 > To: cghersi > Subject: Re: Temporary ID hasn't

Re: Temporary ID hasn't been replaced on commit

2012-03-09 Thread Michael Gentry
Hi Cristiano, For Cayenne 3.0, it is in DataObjectUtils.intPKForObject(). mrg On Fri, Mar 9, 2012 at 11:33 AM, cghersi wrote: > I cannot find documentation for your proposal (Cayenne.inPkForObject): may > you give me an example of use?

RE: Temporary ID hasn't been replaced on commit

2012-03-09 Thread cghersi
Subject: Re: Temporary ID hasn't been replaced on commit > Is there any effective way to directly retrieve the ID of the just added > object after the context.commitChanges() invocation? After commit the ID should be available via normal Cayenne APIs (e.g. Cayenne.inPkForObject).

Re: Temporary ID hasn't been replaced on commit

2012-03-09 Thread Andrus Adamchik
> > > > Best > > cghersi > > > > From: cghersi [via Cayenne] [mailto:ml-node+s195n3806195...@n3.nabble.com] > Sent: mercoledì 7 marzo 2012 09:43 > To: cghersi > Subject: Re: Temporary ID hasn't been replaced on commit > > > > Hi A

RE: Temporary ID hasn't been replaced on commit

2012-03-09 Thread cghersi
: mercoledì 7 marzo 2012 09:43 To: cghersi Subject: Re: Temporary ID hasn't been replaced on commit Hi Andrus, here there's the code that I use to save my object: private AtomicReference context = new AtomicReference(config.getDomain("PacketDomain"

Re: Temporary ID hasn't been replaced on commit

2012-03-07 Thread cghersi
Hi Andrus, here there's the code that I use to save my object: private AtomicReference context = new AtomicReference(config.getDomain("PacketDomain").createDataContext()); public Network GetNetworkByPK(Integer pkID) { ObjectId id = new ObjectId(Network.c

Re: Temporary ID hasn't been replaced on commit

2012-03-06 Thread Andrus Adamchik
I feel like at this point I can't help much without access to the code in debugger :-/ On Mar 6, 2012, at 4:48 AM, cghersi wrote: > Hi Michael, > thank you for the hint. > I double checked the To Dep PK option and in fact some of the relationships > were wrong, but nevertheless the problem persi

Re: Temporary ID hasn't been replaced on commit

2012-03-06 Thread cghersi
Hi Michael, thank you for the hint. I double checked the To Dep PK option and in fact some of the relationships were wrong, but nevertheless the problem persists. The problem is now a NullPointerException on DataObjectUtils, line 114: ObjectId id = dataObject.getObjectId(); if (!id

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Michael Gentry
That would be my guess ... Can you double check that you do not have a cyclic graph? The AshwoodEntitySorter sometimes gets wrapped around the axle and doesn't throw an exception when it should. When you have to-many (or to-dependent PK) relationships, the owning object must be inserted first.

RE: Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
] Sent: lunedì 5 marzo 2012 17:49 To: cghersi Subject: Re: Temporary ID hasn't been replaced on commit On Mar 5, 2012, at 11:41 AM, cghersi wrote: > This table is involved in a lot of relationships: is this a possible cause > of failures? Possibly. Can you check if there is a r

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Here there is the snippet of code that I use to save my object: ... private AtomicReference context = new AtomicReference(config.getDomain("PacketDomain").createDataContext()); private void CommitObjects(Class objClass){ synchronized(context){

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Andrus Adamchik
On Mar 5, 2012, at 11:41 AM, cghersi wrote: > This table is involved in a lot of relationships: is this a possible cause > of failures? Possibly. Can you check if there is a relationship pointing to this table with "To Dep PK" checked. Andrus

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
here there is the part of xml config file:

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Andrus Adamchik
Looks good. If it is also "Database-generated" in Cayenne model, then everything I can think of is correct. Based on the information that you've provided, I can't think of anything else Cayenne-related that might cause it :-/ Andrus On Mar 5, 2012, at 11:10 AM, cghersi wrote: > Hi Andrus, than

RE: Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
il]] Sent: Monday, March 05, 2012 5:05 PM To: [hidden email] Subject: Temporary ID hasn't been replaced on commit Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID hasn&#

RE: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Durchholz, Joachim
Oops, sorry, I meant to reply in private. (For some reason, Outlook replies to the list regardless of whether I click "reply to all" or "reply to sender". And I keep forgetting to insert the proper recipient manually because it works with Firefox, on other lists - dunno whether it's the program

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Hi Andrus, thank you for the fast reply! The DB is MySQL. The table is created with a code like this: CREATE TABLE PhysicalNode (AdditionalArgs VARCHAR(4000) NULL, BatteryLevel SMALLINT NULL, CoordX DOUBLE NOT NULL, CoordY DOUBLE NOT NULL, CoordZ DOUBLE NOT NULL, Creation BIGINT NOT NULL, CurrentP

RE: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Durchholz, Joachim
a.com] Sent: Monday, March 05, 2012 5:05 PM To: user@cayenne.apache.org Subject: Temporary ID hasn't been replaced on commit Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID

Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID hasn't been replaced on commit". It appears on an object whose table has an autogenerated PK. What can I do to avoid suc

Re: Temporary ID hasn't been replaced on commit

2012-03-05 Thread Andrus Adamchik
;t got any issue; now, > suddenly, sometimes it appears a strange Exception: "Temporary ID hasn't > been replaced on commit". > It appears on an object whose table has an autogenerated PK. > > What can I do to avoid such a situation? > > Thank you very much. &

Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID hasn't been replaced on commit". It appears on an object whose table has an autogenerated PK. What can I do to avoid suc

Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID hasn't been replaced on commit". It appears on an object whose table has an autogenerated PK. What can I do to avoid suc

Temporary ID hasn't been replaced on commit

2012-03-05 Thread cghersi
Hi all, I'm using Cayenne 3.0. For more then 1 year we hadn't got any issue; now, suddenly, sometimes it appears a strange Exception: "Temporary ID hasn't been replaced on commit". It appears on an object whose table has an autogenerated PK. What can I do to avoid suc

Solved with Cayenne3: Temporary ID hasn't been replaced on commit

2010-02-08 Thread Juergen Saar
for the web-interface of a 20 year old project with >>>> meaningful keys. We don't use tapestry. The keys are handled in the >>>> validateForSave(). >>>> >>>> In some cases after commit there is an Exception: "Temporary ID hasn't >

Re: Temporary ID hasn't been replaced on commit

2009-12-10 Thread Juergen Saar
Sorry, my fault ... it seems, I hat the wrong API-Docs selected 2009/12/10 Andrus Adamchik : > Hmm.. Where did you see it? It can't be in the Javadocs (as it's not in the > interface). I found one piece of old docs though:

Re: Temporary ID hasn't been replaced on commit

2009-12-10 Thread Andrus Adamchik
On Dec 10, 2009, at 10:03 AM, Juergen Saar wrote: I've seen it too, but it's not really what I'm looking for ... it should be good for a workaround, so that I can find my PrimaryKey There's no ResultIterator API anymore to read ID's from a wider row. But yes, you can create the ID yourself

Re: Temporary ID hasn't been replaced on commit

2009-12-10 Thread Juergen Saar
; >>>>> >>>>> On Nov 25, 2009, at 10:32 AM, Juergen Saar wrote: >>>>> >>>>> I'm using Version 2.0.4 ... >>>>>> >>>>>> 2009/11/25 Andrus Adamchik >>>>>> >>>>&g

Re: Temporary ID hasn't been replaced on commit

2009-12-10 Thread Michael Gentry
using it, but what version of Cayenne are >>>>>> >>>>>> you using? >>>>>> >>>>>> Andrus >>>>>> >>>>>> >>>>>> On Nov 25, 2009, at 9:49 AM, Juergen Saar wrote: >>>&

Re: Temporary ID hasn't been replaced on commit

2009-12-10 Thread Juergen Saar
u using? >>>>> >>>>> Andrus >>>>> >>>>> >>>>> On Nov 25, 2009, at 9:49 AM, Juergen Saar wrote: >>>>> >>>>> Hi, >>>>> >>>>>> >>>>>> we're using c

Re: Temporary ID hasn't been replaced on commit

2009-11-25 Thread Michael Gentry
On Wed, Nov 25, 2009 at 8:47 AM, Juergen Saar wrote: > For using 3.0 in productive environment ... Is there a time-scale for the > final 3.0? There isn't a final date, but hope to have it out soon. However, I don't think you should let the beta label stop you. I'm using 3.0B1 in something I pla

Re: Temporary ID hasn't been replaced on commit

2009-11-25 Thread Andrus Adamchik
ul keys. We don't use tapestry. The keys are handled in the validateForSave(). In some cases after commit there is an Exception: "Temporary ID hasn't been replaced on commit" The values of the Dataobject are OK and the Informations put to database are correct. In the

Re: Temporary ID hasn't been replaced on commit

2009-11-25 Thread Juergen Saar
009, at 9:49 AM, Juergen Saar wrote: >>> >>> Hi, >>> >>>> >>>> we're using cayenne for the web-interface of a 20 year old project with >>>> meaningful keys. We don't use tapestry. The keys are handled in the >>>> va

Re: Temporary ID hasn't been replaced on commit

2009-11-25 Thread Andrus Adamchik
ear old project with meaningful keys. We don't use tapestry. The keys are handled in the validateForSave(). In some cases after commit there is an Exception: "Temporary ID hasn't been replaced on commit" The values of the Dataobject are OK and the Informations put to dat

Re: Temporary ID hasn't been replaced on commit

2009-11-25 Thread Juergen Saar
ne for the web-interface of a 20 year old project with >> meaningful keys. We don't use tapestry. The keys are handled in the >> validateForSave(). >> >> In some cases after commit there is an Exception: "Temporary ID hasn't >> been >> replaced

Re: Temporary ID hasn't been replaced on commit

2009-11-24 Thread Andrus Adamchik
handled in the validateForSave(). In some cases after commit there is an Exception: "Temporary ID hasn't been replaced on commit" The values of the Dataobject are OK and the Informations put to database are correct. In the Objects that cause this Exception I can't see a

Temporary ID hasn't been replaced on commit

2009-11-24 Thread Juergen Saar
Hi, we're using cayenne for the web-interface of a 20 year old project with meaningful keys. We don't use tapestry. The keys are handled in the validateForSave(). In some cases after commit there is an Exception: "Temporary ID hasn't been replaced on commit" The values

Temporary ID hasn't been replaced on commit

2007-08-14 Thread Jan Lendholt
QueryLogger: INSERT INTO ACCESS.MAPPING_LEISTUNG_BUCHUNG (ANZAHL, BUCHID, IDLEISTUNG) VALUES (?, ?, ?) INFO QueryLogger: [bind: 1, 13059, 25] Exception: 09:53:15.843 WARN!! Exception for /ams?serviceId=Echo.Synchronize org.apache.cayenne.CayenneRuntimeException: [EMAIL PROTECTED]@ @[EMAIL PROTECTED] Temporar