-->
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: Hibernate + Validator break with wrong getter/setter order
PostPosted: Tue Apr 24, 2007 10:56 am 
Newbie

Joined: Thu Apr 19, 2007 5:43 am
Posts: 4
Location: Solingen, .de
Hi all,

I've just found out that a self-made annotated validation method called public boolean isAnsprechpartner() annotated with @AssertTrue breaks the entire persisting functionality of my application. ClassCastException!

The reason: the getter is called getAnsprechpartner(). The fix: if I move isAnsprechpartner() down in the class, it works again because obviously now, for persisting the data, getAnsprechpartner() is used because it comes first in the class.

Is this normal behaviour? If not, is it documented anywhere? If not, why not? I've just spent 2 hours debugging until I found this solution.

Regards,
Robert


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 10:17 am 
Regular
Regular

Joined: Fri May 12, 2006 4:05 am
Posts: 106
Hibernate shows undefined behaviour when classes contain both forms of java-bean-getters (that's getProperty() and isProperty()).
There's already a jira-issue on that matter, but that hasn't been seen to yet.

Regards

piet


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