Hi .V,

friendVU admin wrote:
Huy wrote:

have a single resultmap for an entire table/domain class mapping which can be reused in multiple <select> statements without the select statement providing every column specified in the result map.


I do get what you want... having done quite a few iBatis projects, I allways have only one result map!
Like in Groovy and Associtavie Arrays(Flash) you want to be loosly typed.

Not sure I'd put it that way i.e "losely typed"

And.... it's supported feature:

<select    id="joinId"  resultClass="java.util.HashMap" >
   select
       max(id) as id, bla, bla2 ....
I allways use HashMap.
I get back a list of Maps, very cool.

I see what you mean but I need my domain objects because my apps are used by different clients with different databases with different schemas (similar but not exact; it's a legacy thing). The domain objects help me to keep all my other layers independent of the database schema. I know I can do "select column as blah" but I really don't like doing this in all my selects (it could get error prone).


I really do believe that resultmaps is required for my situation. I just think it's a good idea to make it just that little bit more flexible.

And like other loosly typed langages, I do not write gets. and sets anymore.

I find myself still wanting to define object attributes in python because it makes the whole app easier to grok on first impressions. gets and sets are much more conveniently handled in python though (and in ruby I think).


(I used to bind collections to Struts, and now I do it to Swing Data Model - via Hessian).
Many times I just do select * and display a JTable!!!
And I can change any of the layerss.

I can definitely see the appeal of using Hashmaps. The simplicity is nice. However, unless you can help me overcome the problem above, I can't see how I can use it effectively.


So try that can call me in the morning.

Thanks

.V

I see you practice simplicity everywhere :-)


Regards,

huy

Reply via email to