cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <nirvd...@gmail.com>
Subject Re: CAY-1378, CAY-1009...
Date Wed, 10 Feb 2010 12:44:31 GMT
On Wed, Feb 10, 2010 at 3:53 AM, Andrus Adamchik <andrus@objectstyle.org> wrote:

>
> Now back to 3.0... Could you explain why there is a mismatch in the mapping?
> I.e. why can't you remap (A -> C ; C -> B) as either (A -> C ; C -> A) or
(B
> -> C ; C -> B) from the application design perspective?

I don't think this was my case, but the reason I mapped the way I did
is that 11 out of 12 columns were in common between several classes,
so I used STI.  I mapped the relationship for the one subclass that
needed it because it was the only one that needed it.  While I could
have mapped it at the superclass level, all other siblings would then
have the method, which would be logically invalid.  Additionally, I
couldn't reasonably enforce a mandatory constraint.

At the time I also looked into having Cayenne not create runtime
relationships that it didn't need to . . . after all, this one is
mapped.  But I ran into much larger obstacles when doing that, so I
decided to try to figure out how to work with them.

-- 
Kevin

Mime
View raw message