0

I have two tables user and authority table which are one-to-one mapped over shared Primarykey.

Now I want to have a one(user) to many(logdetail) between existing user table and a new table logdetail.

Basically this is what I want to achieve :

logdetail will have a foreign key column which is a primary key in already existing user table, of course the cascading functionality between these two tables.

Is this possible using hibernate ? or I have to do it by SQL queries in the DB(MySql)?

If possible could you please give a simple example.Or please suggest a better way to do this.

day_dreamer
  • 824
  • 3
  • 13
  • 33

1 Answers1

0

I got the answer for what I have been looking for here :

http://www.youtube.com/watch?v=F3Bct8tkfcs

day_dreamer
  • 824
  • 3
  • 13
  • 33