Hi guys,

I'm working with Laurent on the same project and we have a strange behavior with this architecture.

Lets say, we have our MASTER and MASTER_AUX tables, also the right relationship between them.

We've set the database up as read only to simulate a database write error.

When we ask cayenne to update record in MASTER and insert some in MASTER_AUX an error occurs (because of read only db), which is normal. Here we ask for a rollback on the data context. MASTER's record get rolled back and new MASTER_AUX objects get transient state (which is normal).

But the strange thing is the following, when we ask to MASTER its MASTER_AUX objects (by the relationship), cayenne returns all MASTER_AUX objects even the transients.

This the problem with this behavior cause that on the next commit all transient MASTER_AUX object wont be committed to the database.

Is it a normal behavior ?

BTW - we are using cayenne 3.0M4

Thanks

Francois

Laurent Marchal wrote:
Nice this solve the problem !

Sorry to bother you with that, and thanks a lot.
It's a little bit complicated to understand what do Cayenne internally, but luckylly you were there.

Laurent.

Andrus Adamchik wrote:
Could you check the "To Dep PK" checkbox for this relationship and see if that makes a difference.

Andrus


On Jul 15, 2008, at 6:43 PM, Laurent Marchal wrote:
<db-relationship name="toMasterScheduleAux" source="SNAME" target="SNAME_AUX" toMany="true">
      <db-attribute-pair source="SKDID" target="SKDID"/>
  </db-relationship>





_________________________________________________________________________

Ce message a été vérifié par l'antivirus de MDaemon (md6).

Par précaution, n'ouvrez pas de pièces jointes de correspondants inconnus.
_________________________________________________________________________


___________________________________________________

Ce message a été vérifié par l'antivirus de MDaemon 5 .

Par précaution, n'ouvrez pas de pièces jointes de correspondants inconnus.
___________________________________________________


Reply via email to