ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NehaP <neha...@gmail.com>
Subject Re: Question about Abator
Date Sat, 25 Aug 2007 06:59:32 GMT

Hi,

The xml files, DAOs and particularly the Example file generated by Abator
are very useful, hand-coding these would be more difficult than having them
generated by Abator. The flexibility of Abator is limited only due to the
fact that we cannot specify a custom Model bean. If we could, then giving
Abator the mapping between the custom bean and the existing database columns
would be as tough as simply specifying a resultMap in an SQLMap file (and
not as tough as writing the whole SQLMap file itself).

Any opinions?

Thanks!
Neha.


Jeff Butler-2 wrote:
> 
> Abator doesn't do this.
> 
> Supplying such a mapping to Abator would be about the same level of
> difficulty as writing your own SqlMap files for your existing beans.  If
> you
> have a set of existing beans, then I suggest that you hand code the SqlMap
> files - it's pretty simple.
> 
> Jeff Butler
> 
> 
> On 8/24/07, NehaP <nehagp2@gmail.com> wrote:
>>
>>
>> But it should be possible.
>>
>> I guess this could be a feature request?
>>
>> Neha.
>>
>>
>> Yuvraj Shinde wrote:
>> >
>> > I think,
>> >
>> >  You cannot customize the abator.xml.you have to manually do it your
>> > self.
>> >
>> > Regards
>> > yuvraj
>> >
>> > -----Original Message-----
>> > From: NehaP [mailto:nehagp2@gmail.com]
>> > Sent: Friday, August 24, 2007 6:17 PM
>> > To: user-java@ibatis.apache.org
>> > Subject: Question about Abator
>> >
>> >
>> > Hi,
>> >
>> > I wasnt able to find a forum for Abator, hope this is the right forum
>> > for
>> > this question.
>> >
>> > Before using Abator, I had a set of beans, say of User and Address,
>> that
>> > looked like this
>> >
>> > [code]
>> > public class Address
>> > {
>> >    private String city, street;
>> >    private int zipCode;
>> >    // Getters and setters....
>> > }
>> >
>> > public class User
>> > {
>> >    private Address adr;
>> >    // Other fields..
>> >    // Getters and Setters
>> > }
>> >
>> > [/code]
>> >
>> > And my db has all these fields in the same table- User
>> >
>> > When I try to use Abator to generate the required xml files and the
>> > DAOs,
>> > the model bean that gets generated for the User class is obviously not
>> > identical to my class. Modifying the generated code is not a good
>> > practice,
>> > so I cant use the generated code and have to use my custom DAOs and xml
>> > files.
>> >
>> > If only there were a way to specify to Abator to not generate model
>> > beans,
>> > and to use my beans instead (I could provide the mapping), I could use
>> > the
>> > generated DAOs and xml files. Is there a way of doing this?
>> >
>> > Thanks!
>> > Neha.
>> >
>> > PS: I'm a newbie at both- iBATIS  and Abator :-)
>> > --
>> > View this message in context:
>> > http://www.nabble.com/Question-about-Abator-tf4323332.html#a12311608
>> > Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Question-about-Abator-tf4323332.html#a12311906
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-Abator-tf4323332.html#a12323703
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message