cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Becker <joelbeck...@gmail.com>
Subject Modeling Embeddable - using the same embeddable for multiple objects
Date Thu, 25 Aug 2011 20:17:04 GMT
(I'm certainly not planning to continue this rate of posting questions. It's
just that i'm here at my full time job just now converting our entire
persistence layer to use Cayenne and am learning everything now. I have been
doing thorough web searches and reading before asking these. I appreciate
this product and the support here.)

When creating an Embeddable, are you required to create a corresponding
attribute in the db entity in which it will be embedded? Furthermore if you
use the same embeddable in two or three different objects (e.g. Address for
Users, Buildings, etc.), must you create a corresponding attribute in each
of the entity tables? (e.g. add attributes city, state, zip, line1, line2 to
both USERS and BUILDINGS tables.) I didn't see anything about having to do
that in the modeler guide:
http://cayenne.apache.org/doc30/modeling-embeddables.html, so i didn't at
first, but then the modeler validation gives the warning "
 ObjAttribute has no DbAttribute mapping."

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message