Re: Are iBATIS pojos instrumented?

2008-08-28 Thread David_Greenberg
To prevent lazy loading, add the following to your SQL map config file: This is not necessary unless you string together result maps, but if you're worried about serialization, it's your best bet. -David From: Ed Murphy <[EMAIL PROTECTED]> To: user-java@ibatis.apache.org Date: 08/28/2008 01:

Input in ResultMap

2008-08-15 Thread David_Greenberg
Hi, This is probably an FAQ, but I couldn't find any examples of it. It seems to be related to the N+1 problem, but I think there is a fundamental difference in that no database lookup should be necessary. Is there a way to specify that the value in a result map should be equal to an input pa

Re: Problem with my query.

2008-06-19 Thread David_Greenberg
I'm not entirely sure what you're trying to do, as that query at the end of your message looks like a good solution to me. It sounds like you are trying to do something more complicated. Depending on your DBMS, you can try something like this: select ACCOUNT.* from ACCOUNT, (select NU

Re: Nested Dynamic Statements

2008-06-16 Thread David_Greenberg
I'm not sure about other database systems, but MySQL (5) will throw an error for this query: select * from mytable where () and field3 = prop3 Is Ibatis smart enough to remove the "(" and ")" when the contents are empty? One workaround is to put this in the parentheses, but this is an ugly ha

Nested Dynamic Statements

2008-06-13 Thread David_Greenberg
Hi, Is it possible to nest dynamic statements in Ibatis? Here is a simple example of what I want to do: select * from mytable field1 = prop1