-->
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.  [ 5 posts ] 
Author Message
 Post subject: Empty strings and Oracle
PostPosted: Mon Oct 03, 2005 11:39 am 
Hello.

I've just ported to the lates nhibernate version from 0.7.

It seems problem with empty strings and oracle is back. When I try to save field with empty string it says thay there is no length specified for parameter :p0.

I have to add extra code to interceptor and session proxy to convert all empty string to nulls. Is there a better solution?


Top
  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 2:50 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You can try using EmptyStringType from NHibernateContrib, it should do the conversion for you.


Top
 Profile  
 
 Post subject: Empty strings and Oracle.
PostPosted: Tue Oct 04, 2005 5:02 am 
Great. Thanks.


Top
  
 
 Post subject: Empty strings and Oracle
PostPosted: Tue Oct 04, 2005 9:48 am 
What about passing empty string as parameter like

return session.Find("...", new object[] {""}, new IType[] { ?????? });

EmptyStringType is IUserType. I can't use it here. Is there something I can use here?


Top
  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 10:02 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I think you can just pass NHibernateUtil.String to Find in this case. Or use NHibernateUtil.Custom(typeof(EmptyStringType)).


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