-->
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.  [ 9 posts ] 
Author Message
 Post subject: Cloudscape 3.6 vs Cloudscape 5.1
PostPosted: Tue Jan 20, 2004 2:15 pm 
Beginner
Beginner

Joined: Tue Oct 07, 2003 12:11 pm
Posts: 32
Location: US
I am aware of the fact that cloudscape is not officially supported.

I get an error -->NULL DATE under Cloudscape yields SQL Exception: Attempt to set parameter 5 to null type 'TIMESTAMP' when actual type is 'DATE'

As a workaround if I modify net.sf.hibernate.persister.EntityPersister to handle TIMESTAMP properly in Cloudscape 3.6 it would work

I am concerned that we might fix the wrong place (.e. fix the db when we it might be a problem in Hibernate) but not sure of that.

Could any one provide clarity on this? Any help would be greately appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2004 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
What are the types of the column and of the hibernate property?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:18 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 12:11 pm
Posts: 32
Location: US
Types of the column in Cloudscape is
Code:
MODIFIED_DATETIME Date

Hibernate property
Code:
<property column="MODIFIED_DATETIME" length="29" name="modifiedDatetime" not-null="false" type="java.util.Date"/>

when i set a null value and try to save it, gives an error like this.
Code:
SQL Exception: Attempt to set parameter 7 to null type 'TIMESTAMP' when actual type is 'DATE'.


When my datatype in the DB is not a Date and is 'TIMESTAMP' and I try to insert null, it workes fine.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Are you sure this is not some kind of JDBC Driver Bug or something? What have you changed in Hibernate as workaround?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:28 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 12:11 pm
Posts: 32
Location: US
I did not change in Hibernate.
I was planning to do something.
I was wondering if I write a custom dialect something like cloudscapeDialect would solve this. Please correct me if I am wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Most likely not. This seems rather like a JDBC driver bug which does not handle setDate(null) correctly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:32 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 12:11 pm
Posts: 32
Location: US
Tracing through the code, it looks like EntityPersister thinks the type is a timestamp, when it should be treated as a date


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
have you tried type="date" ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:51 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 12:11 pm
Posts: 32
Location: US
it works. thank you.


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