On 7/26/06, Christopher Cheng <[EMAIL PROTECTED]> wrote:
I have a problem with the indirection table mapping.
<class-descriptor
class="com.example.Project"
table="Project">
<collection-descriptor
name="members"
element-class-ref="com.example.Member"
orderby="memberId"
auto-retrieve="true"
auto-update="true"
auto-delete="false"
indirection-table="ProjectPerson">
<fk-pointing-to-this-class column="ProjectId"/>
<fk-pointing-to-element-class column="MemberId"/>
</collection-descriptor>
</class-descriptor>
Supposing that I set the auto-update to false, when I store the project
object with "broker.store(project)", will the indirection table being
updated? My experiment shows that it doesn't.
Yes, that is the intended behavior.
However, if I set auto-update
to "true", the broker will store all members again. In a lot of scenerios,
it is not desirable because of performance reason.
Also true.
My question how do I store the values in the in-direction table "project
person" when using store() without re-save all "members"?
Have a look at the available settings:
http://db.apache.org/ojb/docu/guides/basic-technique.html#1%3An+auto-xxx+setting
Basically, you probably want to use the link value.
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]