cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Giaccone <tgiacc...@gmail.com>
Subject Mapping Question
Date Tue, 12 Apr 2011 19:43:49 GMT
This is more of a generic question, though I'm interested in how it might be
implemented in Cayenne as well.


I have a number of entities, Think Topic, Project, Category, Asset.  On each
one I need to model a to many relationship to Notes, Where a Note is an
object with a subject and a date created and content.

I"m not sure what the best strategy is to map each of these different
entities. I really don't want to create 4 note tables, So that there's a
Topic Note table, and a Project  Note table and  well you get the idea.

I could put a discriminator on the table, so that each entry has it's own
"type" that would solve part of the problem, but they I have to create the
foreign keys relationship.

So I'm just looking for some advice. Have you dealt with a similar
situation, and how did you model in general this solution and in Cayenne in
particular.

Thanks for the help


Tony Giaccone

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