You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Erhart Norbert, R235" <Er...@akdb.de> on 2003/09/15 10:50:17 UTC

Wrong attribute value after object materialisation

Hello fellow ojb users,

I have 2 Tables which are in a 1:n relation, lets say ARTICLE and ARTICLE_GROUP. Sometimes I create a new Instance of ARTICLE_GROUP with some new ARTICLES. When I now read all ARTICLEGROUP Instances from the Database again, there is one attribute of the last created ARTICLE_GROUP instance, which has a wrong value now. Instaed of the proper name of the article group, there is the id value of one of the corresponding articles in this attribute. There are the correct values in the Database.

The repository looks like this:

<...>
    <collection-descriptor
         name="articleList"
         element-class-ref="Article"
         refresh="true"
         auto-retrieve="true"
    >
          <inverse-foreignkey field-ref="art_id" />
    </collection-descriptor>
<...>

When I clear the ObjectCache, before reading from the DB, everything is ok, but I don't want to clear the cache erveytime, after writing new objects and before rereading from this table again.

The cache I am using is: org.apache.ojb.broker.cache.ObjectCacheDefaultImpl.

Has anyone ever had similar problems and how did you manage to solve them?

Best regards
Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org