aspose file tools
The moose likes Object Relational Mapping and the fly likes Hibernate relationl table with aditional column Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Hibernate relationl table with aditional column" Watch "Hibernate relationl table with aditional column" New topic
Author

Hibernate relationl table with aditional column

Ahasan Habib
Greenhorn

Joined: May 26, 2010
Posts: 5
Dear experts,

I am facing problem in composite-element mapping of hibernate. My expected relation is many to many in document and task. That is a task may have multiple documents and a document may have assigned to multiple task. Relational table will contain both foregin key with additional column. In attachment I have given the tables structures.

My Task hbm file:


My document hbm file:


I have created all mapping files. My question what will be the java code for inserting in TM_TASK table as well as for TM_TASKDOCS table. And what will be the TaskDocsInfo class exactly. where I have to create the composite class instance and have to assign this instance? I have tried with the following code but fails



Please help.

Thanks in advance



[Thumbnail for M2M.JPG]

Ahasan Habib
Greenhorn

Joined: May 26, 2010
Posts: 5
Please reply anyone
Ahasan Habib
Greenhorn

Joined: May 26, 2010
Posts: 5
No one here to help
Randeep Singh Arora
Greenhorn

Joined: May 14, 2010
Posts: 6
send me your code and contact me at skype rsingh008.I may be able to help you out...
Ahasan Habib
Greenhorn

Joined: May 26, 2010
Posts: 5
Hi Mr. Randeep Singh,

I have added you on skype (my id: sumon.dsl) but can not get you online. Please help.

Thanks in advance
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Hibernate relationl table with aditional column
 
Similar Threads
Hibernate + One to many associate + Unidirectional
Hibernate - Force foreign key lookup on insert
How does hibernate handle IDs when persisting parent adn its children?
Hibernate Association table - extra column
Recursive Mapping of collections