-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Why use ID tag in mapping file
PostPosted: Mon Nov 27, 2006 12:58 am 
Newbie

Joined: Mon Oct 23, 2006 12:27 am
Posts: 4
Location: sri lanaka
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Hi all, I have a small problem with hibernate...

In hibernate mapping file, we must specify an "id" field, and usually it is the primary key of the table. But if I don’t have a primary key for my table, then also I have to define an "id" tag,

What is the requirement of the ID tag when it is not use a primary key for a table?

Thank you




Read this: http://hibernate.org/42.html

_________________
R P Janaka Priyadarshana
Dept Of Computer Science & Engineering
University Of Moratuwa
Moratuwa
Sri Lanka.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 2:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not tool related - (think about how you would distinguish one row from another if you did not have a set of columns to use as an id and if that does not help post in the user group)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.