>Right.  My fix doesn't address this, and I'm inclined to leave it as 
>is, since i don't know how else it should behave.  ORMapMaker should 
>probably print a warning... but you definitely can't have multiple 
>relations of the same name from the same table.
>
>As a corrollary, this will produce buggy code:
>
>CREATE TABLE foo
>       {
>       fnord_id references fnord(id) /* blah */
>       }
>
>CREATE TABLE bar
>       {
>       fnord_id references fnord(id) /* blah */
>       }
>
>CREATE TABLE fnord...
>
>Now there will be two blah() methods (etc.) in Fnord.java, which is no good.

Except this is not what I'm doing.
What I'm doing is making a many-to-one relation 
(getReferred/setReferred) and a one-to-many relation (referred(), 
addReferred(), removeReferred()).  These do different things and are 
not overlapping, or confusing.  The only name collision is in the 
name of the SoftReference.  One SoftReference is the many-to-one 
relation, and one is the one-to-many relation.  If you simply renamed 
one of the SoftReferences (or even easier, tag the name of the soft 
reference with its type, like (SoftReference referredOTM; 
SoftReference referred MTO;) than this should work fine, shouldn't 
it?  And since the SoftReferences are private, the change of name 
won't break any non-generated classes.  I know it's a small thing, 
but it's one that's easily avoidable.

Avi



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to