-->
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: @AssertTrue with @Transient
PostPosted: Mon Sep 01, 2008 4:55 am 
Regular
Regular

Joined: Tue Jun 03, 2008 1:12 pm
Posts: 84
Location: germany
Hello, I have to validate one field with a transient field:

Code:
public String getPassword() {

        return password;
    }
public void setPassword(String password) {
        this.password = password;
    }

private String passwordConfirm;

@Transient
public String getPasswordConfirm() {
return passwordConfirm;
}

public void setPasswordConfirm(String passwordConfirm) {
this.passwordConfirm = passwordConfirm;
}

@AssertFalse(message="Password and Confirm Password does not match!")
public Boolean check() {

if (!this.getPassword().equals(this.getPasswordConfirm()))
{return false;}
else return true;
}


What is wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 9:34 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

still having the same problem? I don't think that this has anything to do with the @Transient field, or does it work without?

Do you have any exceptions or log files?

--Hardy


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.