Bug 93 : Support for boolean fields/properties starting with "is"
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
1.1.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
23/03/2009
Updated 
23/03/2009
Type 
Bug
 
Attachments 
No attachments

In some cases boolean names start with is.

boolean isSomething;

public boolean isSomething() {
return isSomething;
}

public void setSomething(boolean isSomething) {
this.isSomething = isSomething;
}

Normally Ebean expects boolean fields to not start with "is" and would expect the field name to actually be "something" rather than "isSomething".

You can get a No Such Method error with Ebean trying to find a "setIsSomething()" method which does not exist.

 
Rob 23 Mar 09:21
Fixed in HEAD

Added fixed code for this into HEAD.

Rob 25 Mar 11:45
Specific check for Boolean and boolean

As per Mario's request specific type checks are made for Boolean and boolean.

That is, we only want to support this special "is" prefix for boolean types (not any other type).

That specific type checking is now in HEAD.

woResponse

Upload a file