[EMAIL PROTECTED] wrote:
Yes I did, but I want it to auto update.
I guess I don't understand how it's working. Can you explain why those are not allowed. I have both auto delete and update set to true. How about auto retrieve?
All locked and modified objects will be updated on commit, this is managed by the odmg-layer itself. Currently the auto-update/delete properties independently used by the PB-api, that's the reason for the duplicate insert. odmg-api trace all changes for locked objects and do persist all changes (should do ;-)) on commit.
See info about the attributes http://db.apache.org/ojb/repository.html#collection-descriptor
The default settings of the auto-XXX attributes are best practices for odmg-api.
regards, Armin
<collection-descriptor name="colleges" element-class-ref="com.vu.applynow.applicant.College" orderby="id" auto-retrieve="true" auto-update="true" auto-delete="true">
<inverse-foreignkey field-ref="applicant_id"/>
</collection-descriptor>
How about this entry. I want a reference to the class, but I don't want them to update or delete the referenced object.
<collection-descriptor name="dualenrolls" element-class-ref="com.vu.applynow.applicant.DualEnroll" auto-retrieve="true" auto-update="false" auto-delete="false" indirection-table="AppToDE">
<fk-pointing-to-this-class column="applicant_id"/>
<fk-pointing-to-element-class column="dualenroll_id"/>
</collection-descriptor>
Justin A. Stanczak Web Manager Shake Learning Resource Center Vincennes University (812)888-5813
Please turn your popup blocker off to allow this function to work.
Armin Waibel <[EMAIL PROTECTED]> 02/28/2004 05:34 PM Please respond to "OJB Users List"
To: OJB Users List <[EMAIL PROTECTED]>
cc: Subject: Re: Multiple table entries on vector object.
Hi Justin,
anyone's guess ... ;-),
did you set auto-update 'true' in your collection-descriptor? If set true you will get double inserts.
When using the odmg-api it's not allowed to set auto-update/auto-delete 'true'.
regards, Armin
[EMAIL PROTECTED] wrote:
I have a 1:m setup with a vector of objects. When the data is saved to
the
database there's double entries showing in the database table. To
explain
further in case I'm not clear. I have an object with a vector of college
objects in it. I add several college objects to the vector in the app object and save the app object to the database. Then when I go to the database table and view the college table I see double of all entries.
If
I then use my program to access that object from the table I don't get double on the odmg side. Can someone tell me if this is supposed to be like that?
Justin A. Stanczak Web Manager Shake Learning Resource Center Vincennes University (812)888-5813
Please turn your popup blocker off to allow this function to work.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
