ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Rink <li...@zimmer428.net>
Subject Re: working with "raw" map<k,v>s instead of entities?
Date Thu, 17 Dec 2009 12:20:08 GMT
Larry Meadors schrieb:
> Interesting idea - so you end up with something like this?
> myEntity.id
> myEntity.name
> myEntity.attributes.someField
> myEntity.attributes.someOtherField

Yes, that's basically what it is supposed to be. Reason for this: We're, 
in the backend, using a legacy (proprietary :( ) document management 
system which has a somewhat "dynamic" RDBMS database / table structure 
which is subject to extension pretty often, so, asides a couple of 
"fixed" values (id, name, ...), the "dynamic" approach of having 
everything else in a Map or a Properties object so far has proven to be 
the most straightforward solution.

> You could do that, but since you're doing "select *" you'd have to do
> it with a result map or row handler.

Hmmm... is there a "preferred way among these both and/or quick howtos? 
I already stumbled across the RowHandler but, so far, am unsure how to 
correctly apply this one... I'm using iBatis in a Spring 2.x 
environment, btw. :)

TIA and all the best,

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

View raw message