Is the relationship between Club to Facility is a One-To-Many bidirectional
r/ship?

On 6/5/07, Fan <[EMAIL PROTECTED]> wrote:


Hey All:

   I am new to Hibernate Annotations, currently I am building a club
membership system using Appfuse 2.0-m5.

   I have designed the database structure & relationship for this project.
However I have a problem of using hibernate to generate the tables and
maintaining persistence. I hope you all can provide help and advice on my
problem. Thank you in advance !!!

First of all, I have created a POJO for the entity called "Club"

I have a primary key for the "Club" entity which is "clubID" with the
following annotation

@Id @GeneratedValue(strategy=GenerationType.AUTO)
public Long getClubID() {....

Now I want to have another entity called "Facility" which has two primary
keys (or you call them composite keys ?? ) i.e.

1) clubID from the "Club" entity
2) facilityID

Or should I have the following entities instead ? :

1) "Club" entity
2) "Facility" entity
3) "Club_Facility" associated entity

where "club" has clubID and "Facility" has "facilityID"





--
View this message in context:
http://www.nabble.com/Help---Advice-on-Hibernate-JPA-tf3872157s2369.html#a10970790
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
/fadhli

Reply via email to