ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomáš Procházka <t.procha...@centrum.cz>
Subject Re: ibator and default column value
Date Tue, 10 Nov 2009 05:26:20 GMT

Hi.

I found insertSelective, maybe it's better way, maybe it's too complicated.
Problem is when I need show form for user input, record is not in table, but I need default
values for input fields, selectboxed, etc.

Incremental updating is very great. But I doesn't use Eclipse but Netbeans IDE. Maven task
would be much better, it works everywhere, but you need use some Eclipse API for updating
code...

Generated dao also doesn't have any support for limiting result (RowBounds), this may be done
by plugin. 

______________________________________________________________
> Od: "Jeff Butler" <jeffgbutler@gmail.com>
> Komu: user-java@ibatis.apache.org
> Datum: 09.11.2009 18:32
> Předmět: Re: ibator and default column value
>
>The generated insertSelective method is intended to help with default
>values in fields - you can use this method to keep columns out of the
>insert list so that the default value is used.  I understand that this
>does not help you with getting those values back into the domain
>object - you'll have to do a select for that.  Selecting the values
>from the DB is the only reliable way to get the values back in all
>cases.
>
>As for incremental updates to existing code...base Ibator will do this
>for XML files, but not Java files.  The Eclipse plugin supplies this
>function for Java files, so you'll need to wait until the new version
>of the Eclipse plugin comes out for that.  This has been discussed on
>this list many times, so you can look back in the archives to
>understand the reasons for this.
>
>I'm glad Ibator worked for you with iBATIS3!
>
>Jeff Butler
>
>
>2009/11/9 Tomáš Procházka <t.prochazka@centrum.cz>:
>>
>> Hi.
>>
>> I tested now new commit of ibator with iBatis support, it works great.
>>
>> I have only question. It's (or will be) possible generate also default value to class
fields, according to default value in DB? Some column has NULL, another 0 or true/false. If
new instance of domain class will be have default value it's easier to insert it in to table.
>>
>> And it's possible something like incremental update od generated code? If I add some
new column to DB table? If I own query or methods to generated code it will be lost during
next generate.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message