ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick R <ric...@gmail.com>
Subject Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?
Date Mon, 22 Feb 2010 04:50:36 GMT
And those static methods will be moved to a Helper file:) it's not my code:)

On Sun, Feb 21, 2010 at 11:43 PM, Rick R <rickcr@gmail.com> wrote:

> BaseModel just has some utility things mostly for XStream (I do also have
> XStream annotations on my model classes, but I wouldn't think that should
> mess up ibatis?)
>
> BaseModel:
>
> @Override
>     public String toString() {
>         return ToStringBuilder.reflectionToString(this,
>                 ToStringStyle.MULTI_LINE_STYLE);
>     }
>
>     public static <T extends BaseModel> T createObjectFromXStream(File
> aFile,
>             Class className) throws Exception {
>         XStream stream = new XStream(new DomDriver());
>         stream.processAnnotations(className);
>         BufferedReader input = new BufferedReader(new FileReader(aFile));
>         return (T) stream.fromXML(input);
>     }
>
>     public static <T extends BaseModel> T createObjectFromXStream(
>             InputStream istream, Class className) throws Exception {
>         XStream stream = new XStream(new DomDriver());
>         stream.processAnnotations(className);
>         return (T) stream.fromXML(istream);
>
>     }
>
>
>
>
> On Sun, Feb 21, 2010 at 11:36 PM, Guy Rouillier <guyr-ml1@burntmail.com>wrote:
>
>> On 2/21/2010 11:19 PM, Rick R wrote:
>>
>>  To Guy's point, not sure if the object's I'm mapping to matter? but if
>>> so:
>>>
>>> public class ProdAttrGroupAttrValue extends BaseModel {
>>> public class AttributeValue extends BaseModel {
>>>
>>
>> After sending my last reply, I noticed both your object classes extend
>> BaseModel.  What is that?  As a test, I'd suggest removing this derivation
>> to ensure that the base class is not doing things to trip you up.  One
>> BaseModel I've used is from GXT and that definitely has some restrictions on
>> how it is used.
>>
>>
>> --
>> Guy Rouillier
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>
>
> --
> Rick R
>



-- 
Rick R

Mime
View raw message