cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Zeigler <>
Subject Validating super/sub entity relationships, 3.1M3 vs. 3.0.2
Date Mon, 26 Mar 2012 21:41:03 GMT
I'm gradually migrating my projects to 3.1M3 from the 3.0 series. Today, I converted a project
in the modeler and it now complains:

"Usage of super entity's relationships 'Entry.user' as reversed relationships for sub entity
is discouraged"

I'm using single-table inheritance in this case, and "Entry" is the superclass, with two sub-classes.
Every subclass needs a reference to the "user" table, so I put the relationship in the superclass
rather than the subclasses. So my questions:

1) Why is this discouraged?
  1b) What are the side-effects of maintaining the current mapping?
2) I suppose the "correct" thing is to remap this as one relationship to the user table for
each subclass?
3) What change in behavior from 3.0.2 -> 3.1M3 warrants this new warning/preference? Or
has it always been bad practice but now we're letting people know?

View raw message