ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fullam, Jonathan, ALABS" <jful...@att.com>
Subject RE: Best way to define java class for mapping
Date Wed, 01 Mar 2006 15:25:13 GMT
Hello Ashish,
Regarding a way to not have to create a java class for your result class, you could very easily
just set your resultClass to a java.util.HashMap.  This will be popultated for any results
for the key being the name of the field being returned and the value being the value.

As far as the "best way to design" your java classes for mapping; My opinion is that you should
try to not let your current database design dictate how your object model will look.  Design
your java objects in a way that makes sense from an object oriented point of view.  Decide
what makes the best sense in terms of what objects you will need perform your business logic.


-----Original Message-----
From: Ashish Kulkarni [mailto:kulkarni_ash1312@yahoo.com]
Sent: Wednesday, March 01, 2006 10:16 AM
To: user-java@ibatis.apache.org
Subject: Best way to define java class for mapping

What is the best way to design java class for mapping,
for example suppose i have a SQL querry which join 2-3
tables and returns the data, 
should i design java class to match this SQL querry,
or should i design java class to match tables, and
then create a Map in xml file and then populate data
in 2-3 tables.

Is there a utility which will create java class from
or is there any utility where i may not have to create
java class, like DynaActionForm in struts


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message