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 Bogdan Daniliuc <bd...@montran.ro> on 2004/06/23 09:26:54 UTC
Collection Proxy question
Hi all,
We are encountering a problem when using collections with proxy (OJB rc6).
An object has a mapping with an attached collection as:
<class-descriptor....>
...
<collection-descriptor
name="entries"
element-class-ref="elementClass"
proxy="true"
auto-update="true">
<inverse-foreignkey field-ref="objectId"/>
</collection-descriptor>
</class-descriptor>
In some cases we have to retrieve the object from the database, clear its
collection of entries (by calling entries.clear()), and add new elements (with
entries.add()). With proxy set to "false", the old entries are removed from
the database and the new entries added. With proxy set to "true", the old
entries are no longer deleted from the corresponding table.
Is there anything we are doing wrong, or this is the correct behavior?
Regards,
Bogdan
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Collection Proxy question
Posted by Bogdan Daniliuc <bd...@montran.ro>.
Hello,
I'm using only PB API. I will try setting refresh to true. I will also try
with RC7 and see what happends.
Thank you very much for your reply.
Regards,
Bogdan Daniliuc
On Thu, 24 Jun 2004 23:48:17 +0100, Luis Cruz wrote
> Hello,
>
> What API are you using? With RC6, and with ODMG or JDO, auto-update must
> be set to false. Also, I suggest setting the refresh flag to true.
>
> Hope this helps,
> Luis Cruz
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Collection Proxy question
Posted by Luis Cruz <le...@netcabo.pt>.
Hello,
What API are you using? With RC6, and with ODMG or JDO, auto-update must
be set to false. Also, I suggest setting the refresh flag to true.
Hope this helps,
Luis Cruz
On Wed, 2004-06-23 at 08:26, Bogdan Daniliuc wrote:
> Hi all,
>
> We are encountering a problem when using collections with proxy (OJB rc6).
> An object has a mapping with an attached collection as:
> <class-descriptor....>
> ...
> <collection-descriptor
> name="entries"
> element-class-ref="elementClass"
> proxy="true"
> auto-update="true">
> <inverse-foreignkey field-ref="objectId"/>
> </collection-descriptor>
> </class-descriptor>
>
> In some cases we have to retrieve the object from the database, clear its
> collection of entries (by calling entries.clear()), and add new elements (with
> entries.add()). With proxy set to "false", the old entries are removed from
> the database and the new entries added. With proxy set to "true", the old
> entries are no longer deleted from the corresponding table.
> Is there anything we are doing wrong, or this is the correct behavior?
>
> Regards,
>
> Bogdan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org