Yeah, you're right it is a ManyToOne relationship. I was thinking a Store has one (and
only one) "type" Type associated with it at any given time. Completely spaced
looking at it from the Type's perspective.
I think using a @ManyToOne annotation will give me what I need. After playing around with
@PostLoad and @PrePersist in another part of the app. I think I can use this to ensure
that the right Type's are being set in the right fields.
BTW, yes, I do agree having a "table_name" column is a bit much, and in the case
of this app not used at all (except as part of the PK). In fact, it would have likely been
quicker and easier to just use a enum. But alas the tables are what they are, and I do
what I am told (most of the time anyway).
Thanks again for letting me work through this with you.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034369#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...