-->
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: Problem in accessing duplicate primary key
PostPosted: Tue Jun 26, 2007 6:01 am 
Newbie

Joined: Tue Jun 26, 2007 5:45 am
Posts: 4
Currently we are using oracle database which is not normalize.
e.g. We have a table Position which have these columns
1) Id
2) Desc

Example of record in this table is
ID DESC
P Partner1
A Associate
L Paralegal
P Partner
P Partner

Id is declared as primary key in POJO
I tried the following code
Query query=getSession().createQuery("from "+type+" t where t.id is not null");
insurances=query.list();
log.debug("Records are ="+insurances);

This returns the 5 rows as describe above
But when print the list I got the following values
P Partner1
A Associate
L Paralegal
P Partner1
P Partner1

Please suggest me. Thanx in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 27, 2007 1:29 am 
Beginner
Beginner

Joined: Mon Apr 23, 2007 8:30 am
Posts: 27
Location: India
Refer to http://forum.hibernate.org/viewtopic.php?t=976708

-Nikhil


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.