• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate - how to map cross-table dependence?

Alexey Povh
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have three tables - table1, table2 and table3. Table3 have a property prop3 and id t3_id. Table2 have a property prop2 and id t2_id. In table1 there is foreign key "table2_id" and in table2 there is foreign key "table3_id". What should I do if I want to get prop3 from table3 to my table1 mapping-class?
Now I'm using "formula" tag for this task, but I know there must be an easy and much more beautiful way to do that. And also I use "join" tag to get prop2 from table2 to table1 class mapping - it's easy but two dependences mapping...
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!