-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate can tell me witch field too long?
PostPosted: Sun Aug 28, 2005 9:13 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
hibernate can tell me witch field too long?

hi:
every code in my system runs ok,but when some variable that i insert into oracle is too long,hibernate can not tell me witch field is too long,this make the debug become very difficult!the hibernate only tell me witch entity error,it can not tell me ,witch field error(just throw some exception,tell me witch field is too long)!

thanks a lot!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 8:49 pm 
Regular
Regular

Joined: Sat Aug 28, 2004 4:15 pm
Posts: 61
It seems unlikely that the Hibernate folks would parse exception messages to see if the columns referred to are mapped columns that it knows something about.

On the other hand, they could try providing some form of validation that is based on the DDL of your database schema. If you think that would be a useful feature perhaps you should ask for that.

Another alternative would be for you to write your own validation that checks these things prior to attempting to persist a particular object.

_________________
Joe W


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 5:55 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You can use the validator framework for that.
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#validator

_________________
Emmanuel


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