-->
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.  [ 4 posts ] 
Author Message
 Post subject: Is the date key causing this?
PostPosted: Tue Aug 02, 2005 1:56 pm 
Newbie

Joined: Tue Aug 02, 2005 1:54 pm
Posts: 2
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.bkv.search.objectmodel.AggregateSale#com.bkv.search.objectmodel.AggregateSale@6754d6]

The composite key of this table is reportDate and buyID. BuyId is a primary key of another table. Report date is a date/time field in sql server.

I set the date as a java.util.Date in my java bean. Am I getting this error because of the field type for the date?


Top
 Profile  
 
 Post subject: look at the SQL
PostPosted: Tue Aug 02, 2005 2:36 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
I would guess that the Date object contains time part and that is not that is stored in DB. H simply cannot find record that conforms to the given key.


Top
 Profile  
 
 Post subject: same problem
PostPosted: Mon Aug 29, 2005 6:16 am 
Newbie

Joined: Thu Apr 07, 2005 1:55 am
Posts: 8
I have the same problem using a Long as Id ... have y tried to get the row by a query - in my case this is working - I don't kow why


Top
 Profile  
 
 Post subject: A long-shot!!
PostPosted: Mon Aug 29, 2005 6:50 am 
Beginner
Beginner

Joined: Tue Jul 19, 2005 4:03 am
Posts: 34
Location: Aberdeen, UK
A long-shot!!

Have you tried to set the date as a java.sql.Timestamp in your bean??

Some time ago I had some issues with dates and I think it was due to how Hibernate uses java.sql.Timestamp when returning object from the database. It’s worth a try!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.