Thank you, Brian. Your reply was very helpful.
Pulat
Brian McCallister wrote:
Anonymous keys allow you to not have the FK field (or PK if you never
need serialize them) defined on the classes. By default OJB talks
directly to fields, not through property accessors (though it certainly
can work through property accessors).
-Brian
On Sep 13, 2004, at 6:53 PM, Pulat Yunusov wrote:
What is the purpose of anonymous keys? Given class A and class B where
class A has a reference to class B, I removed setId() from both classes,
and setBId() and getBId() from class A. I still have private members id
in both classes, and bId in class A as well as all corresponding field
and reference descritors in the mapping file.
I have not set access to any of the fields as "anonymous" in the mapping
file.
Following that, I have no problem creating instances and setting a
reference between them, persisting them or retrieving them.
I thought you needed anonymous keys for that kind of behavior but I
didn't use them. Can OJB access private instance variables to keep track
of relationships? What exactly are anonymous keys for?
Thank you,
Pulat
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]