Dhananjay Patkar

Greenhorn
+ Follow
since Aug 12, 2008
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dhananjay Patkar

Hi,
Just check you comparing null against an object type. and not for primitive data type.
I have used isNull several times and it works fine....

Cheers,
Dhananjay
Hi David,
You raised good concern, but Please have a look @ iBatis 3 Whiteboard iBatis 3 has support for interface binding, thus eliminating string type query ids ,typecasting ..

Cheers,
Dhananjay
In my opinion,iBatis is kind of OQM (Object Query Mapping) ,while hibernate is complete ORM thus both cant be compared
But 1 thing is for sure is iBatis is much more simpler,easy to learn and gives you more freedom in terms of writting complex SQL queries...
Thats what my experience says..

Cheers,
Dhananjay
Hi,
When Ibatis loads sql-map-config.xml it not only parses sql-map-config, but along with it ,It also parses all mapping files listed in sqlmapconfig.xml
So scan through all possible files ,If any of them is malformed xml you will get parsing error...

Cheers,
Dhananjay
Hi Vishnu,
You need to provide a type handler in case of custom types such as enums
You need to write a class which will implement
com.ibatis.sqlmap.client.extensions.TypeHandlerCallback
and provide implementation for
public Object getResult(ResultGetter getter)throws SQLException
public void setParameter(ParameterSetter setter, Object parameter)throws SQLException

Here's a simple example of a boolean handler that uses "Yes" and "No":
Hi aditee,
It seems you are facing N+1 problem in iBatis...Which is fully solvable
Below code snipet will solve your problem
This is from iBatis Developer guide



myList is a List of beans containing type
"com.ibatis.example.Category". Each object in that List will have a "productList" property that is also a List
populated from the same query, but using the "productResult" result map to populate the beans in the child
list. So, you end up with a list containing sub-lists, and only one database query is executed and both child and parent list are get popultaed as expected..

Cheers,
Dhananjay
Hey,
You can try out dynamic sql in iBatis.
I hope that will solve your problem as long as ,the query you are firing is differs in where clause...

Cheers,
Dhananjay
Hey,
Use <selectKey> ibatis tag ,Then you will achieve what you are expecting.
Its child tag of <insert>.

Cheers,
Dhananjay