-->
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.  [ 1 post ] 
Author Message
 Post subject: annotation.datatype is from getter or variable
PostPosted: Tue Jul 03, 2007 11:46 am 
Beginner
Beginner

Joined: Tue Jul 03, 2007 11:36 am
Posts: 24
Hibernate will treat enabled field as boolean or Boolean? I found that it will be different base on the enviroment? If my jboss without other project run together it will treat it as Boolean, but if run wit jboss default jar and war there, it will run as boolean. Why? Is it because of one of the jar file?

Code:
   @Column(nullable= false, name="enabled")
    private Boolean enabled ;

   private Boolean getEnabled() {
      return enabled;
   }
   
   public boolean isEnabled() {
      if (getEnabled()==null)
         return false;
      return getEnabled().booleanValue();
   }

   public void setEnabled(boolean enabled) {
      this.enabled = enabled;
   }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.