• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with association mapping in Hibernate

 
Rafael Medina
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello...

Can somebody please tell me how to create an association for two tables that need to be joined like substr(table1.field1,4,10) = table2.field1


How can I define that association in Hibernate..?
 
Franck McGeough
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried putting your substr stuff in as a formula in your mapping to materialize a column and then join on that? It'd obviously be much better if something that you're using as a foreign key was a separate column. It seems like getting the association going is just the start of the issues.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic