-->
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: Does ID is required in mapping file, even if table..
PostPosted: Tue Jun 12, 2007 8:17 am 
Newbie

Joined: Tue Jun 12, 2007 7:01 am
Posts: 2
Location: INDIA
Hi Friends,

I have a very simple question, that is id field required in hibernate-mapping file.

If some table don't have any primary then? how to do?

_________________
Regards:

Ashish Mishra
"Work Hard, Party Harder.."


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 12, 2007 8:36 am 
Beginner
Beginner

Joined: Mon Nov 13, 2006 9:43 am
Posts: 30
Hi,


Have you tried to define any other(non-PK) field as id?

I have:

<class name="de.tsystems.fbs3.hibernate.beans.Fbs3LogEntry" table="@schema_name@.V91VLOG_0001">

<id name="actionNumber" column="LOG_AKTION_NR" />
...

</class>

In my case V91VLOG_0001 is even no table but DB view, so there is no PK.

Hope it helps.

Regards,


Giorgi


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.