ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: working with "raw" map<k,v>s instead of entities?
Date Thu, 17 Dec 2009 12:08:46 GMT
Interesting idea - so you end up with something like this?

myEntity.id
myEntity.name
myEntity.attributes.someField
myEntity.attributes.someOtherField

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

Larry


On Thu, Dec 17, 2009 at 1:32 AM, Kristian Rink <lists@zimmer428.net> wrote:
> Folks;
>
> not sure whether this is a stupid question; I've been playing with this idea
> before already: As far as I see, after dealing with a bunch of other
> approaches (EclipseLink/JPA, hibernate, ...), I saw that in the end parts of
> our backend code ended up being a "weak re-implementation" of the iBatis
> idea, which makes me reconsider iBatis once again. For now, looking at the
> feature set, there is one thing I would want to do with iBatis, but I am not
> sure how to do so / whether it can be done at all:
>
> In my situation, I select * from a bunch of tables joined via an identifier,
> to, by then, take the identifier and a few other "fixed" columns which will
> appear all the time and put them into designated values of an entity, and
> the "rest" of the selection simply goes to a Map<string,string> inside the
> entity. While this works pretty well, say, inside a Spring JdbcTemplate
> mapper, I am unsure how / if to do something like this in an iBatis
> configuration file as well. So to ask:
>
> - Is it possible?
> - How to do it, if so?
>
> Thanks a bunch in advance and kindest regards,
> Kristian
>
> ---------------------------------------------------------------------
> 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