hi Erik,
I found your reply is very helpful.
if I have a table with (user_id, user_name.....), another table device(device_id, device_name .....), then I have an association table
user_device(user_id, device_id, ....)
How do I do the hbm mapping ?
In fact, my use case here is that I will have device_id in hand, from there, I would like to find the user_id, eventually I will get other user attributes that I 'd like to know based on user_id, it is a simple join if using JDBC, I don't know how to do it using hibernate for the mapping, it complains the way I mapped is wrong.
? thanks.
|