wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes How mapping -> Composite Id?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How mapping -> Composite Id??" Watch "How mapping -> Composite Id??" New topic
Author

How mapping -> Composite Id??

Bruno Ambrozio
Greenhorn

Joined: May 24, 2004
Posts: 2
Hi,

I have this table and i need to map this. this fields will be composite keys and i would like that anyone help me to configure my hibernate mapping...

+-------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+----------------+
| bairro | int(11) | | PRI | NULL | |
| logradouro | int(20) | | PRI | NULL | |
+-------------+-------------+------+-----+---------+----------------+

I have tried but, i didn�t get it.

I wait that anyone help me!!!

Thank u!


Bruno Brigantini Ambr�zio<br />SCJP 1.4<br />Brazil
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Mapping composite IDs can be a little fiddly Bruno Ambrozio. The example in the Hibernate documentation is as much direstion as anyone can really give you. If you are sure you've carefully tried this, why don't you post you mapping (and possibly the error Hibernate is returning) etc. and we'll see if anyone can spot what's wrong?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How mapping -> Composite Id??
 
Similar Threads
Auto_Increment Primary Key
Hibernate composite-id
Query about Composite keys - Hibernate
Composite Id --- Error in Reading the mapping file
2 Hibernate Qs: Collections, Annotation Mapping