Re: FaultFailureException

2024-11-14 Thread Markus Reich
Thank you for analyzing this case. The idea behind the local context was, that this is a dialog opened by the users where it's possible to create/change other objects and I don't want that a commit in the global context affects the local object. Meex Am Do., 14. Nov. 2024 um 20:21 Uhr schrieb And

Re: FaultFailureException

2024-11-14 Thread Andrus Adamchik
Looking at the code, it appears that "localObject(..)" behavior for NEW objects is incorrect. It creates a HOLLOW object, and as a result an attempt is made to fetch it from the database on first access, resulting in the exception. So formally, this is a bug (or rather a gap) in localObject(..)

Re: FaultFailureException

2024-11-14 Thread Markus Reich
found another case where no relationship is involved, but also the object is moved to a new local Context the error occurs then when trying to the readProperty id public String getId() { beforePropertyRead("id"); return this.id; } id is defined as primary key and mandatory Am Do., 14. Nov.

Re: FaultFailureException

2024-11-14 Thread Andrus Adamchik
FaultFailureExceptions are usually caused by referential integrity problems in DB. But this one is unusual as it references a TEMP ID (i.e. an uncommitted object). I don't think I've seen this flavor. Can you provide some more context around the error. I.e. what code leads to this. Andrus > O

Re: FaultFailureException

2024-11-14 Thread Markus Reich
ok, maybe the problem is that I copy the object to a new context? this.localContext = CayenneUtils.createNewContext(); this.baseEntity = localContext.localObject(baseEntity); then I do a cast Recipes recipe = Recipes.class.cast(baseEntity); and try to get a property, which throws the Excepti

FaultFailureException

2024-11-14 Thread Markus Reich
Hi, in my production environment sometimes I get the following errors: FaultFailureException [v.4.2.1 Jun 14 2024 07:43:08] Error resolving fault, no matching row exists in the database for ObjectId: they are not specific to a certain object and I did get it reproducible to debug it :-/ May