You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Mark Volkmann <ma...@ociweb.com> on 2007/04/06 14:43:40 UTC

Abator-generated model classes and primitive types

It seems that by default Abator-generated model classes use type  
wrappers instead of primitive types for fields that correspond to  
database table columns. For example, a table with a column of type  
int will have a corresponding model object field of type Integer. Why  
aren't primitive types used? Can Abator be configured to use  
primitive types?

Re: Abator-generated model classes and primitive types

Posted by Mark Volkmann <ma...@ociweb.com>.
On Apr 6, 2007, at 8:16 AM, Jeff Butler wrote:

> It's a great big object oriented world out there :)  Also...  
> primitives can't be null but database columns can be null.

Ah ... that's a great reason to not use primitives! Also, with Java 5  
autoboxing client code can still use primitives so it's not a big deal.

>  Abator's default behavior is to use objects, but you can force a  
> primitive with a <columnOverride> if you want to.

Thanks for the explanation!

>  Jeff Butler
>
> On 4/6/07, Mark Volkmann <ma...@ociweb.com> wrote:
> It seems that by default Abator-generated model classes use type
> wrappers instead of primitive types for fields that correspond to
> database table columns. For example, a table with a column of type
> int will have a corresponding model object field of type Integer. Why
> aren't primitive types used? Can Abator be configured to use
> primitive types?
>


Re: Abator-generated model classes and primitive types

Posted by Jeff Butler <je...@gmail.com>.
It's a great big object oriented world out there :)  Also... primitives
can't be null but database columns can be null.

Abator's default behavior is to use objects, but you can force a
primitive with a <columnOverride> if you want to.

Jeff Butler


On 4/6/07, Mark Volkmann <ma...@ociweb.com> wrote:
>
> It seems that by default Abator-generated model classes use type
> wrappers instead of primitive types for fields that correspond to
> database table columns. For example, a table with a column of type
> int will have a corresponding model object field of type Integer. Why
> aren't primitive types used? Can Abator be configured to use
> primitive types?
>