You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Laurent Marchal <lm...@smaeur.com> on 2008/09/11 18:47:38 UTC

3.0M4 : Fetching from relationship returns TRANSIENT objects.

Hello again !

I have a strange thing happening in Cayenne 3.0M4 :
I have two tables ARTIST and ARTIST_AUX where extended artist's
properties are stored.

There is a relationship between ARTIST--->ARTIST_AUX where i checked "To
Dep PK" since no ARTIST_AUX rows can exists without corresponding ARTIST.

I have also a addPrefetch(ARTIST_AUX) when i retrieve ARTISTs.

In my "artist editor" I create ARTIST_AUX rows at need and when an error
occurs i do a rollback().
The strange thing is that when i refetch ARTISTS_AUX with the
relationship, instead of getting only existing ARTISTS_AUX, i get also
the ARTISTS_AUX created before the rollback() with the TRANSIENT state
and no ObjectContext associated.

So my question is : is this normal to get TRANSIENT objects from a
relationship after a rollback ?

Thanks
Laurent Marchal.