FAQ

On Wed, Feb 10, 2010 at 3:53 AM, Andrus Adamchik 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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 16 of 24 | next ›
Discussion Overview
groupdev @
categoriescayenne
postedFeb 7, '10 at 3:18p
activeFeb 27, '10 at 7:38p
posts24
users3
websitecayenne.apache.org

People

Translate

site design / logo © 2021 Grokbase