..\migrate and strored procedures

2010-04-13 Thread Dmitry Mamonov
Hi everyone! I'm trying to apply ibatis-migrations to manage our database schema and I found a semantic problem with it. (we are using postgres if it does matter.) My plan is to maintain ALL changes of database with ..\migrate, including changes in stored procedures. Here is my use-case: 1.

Re: Ibatis 3 - special method in model class which Ibatis can't use

2010-04-13 Thread Tomáš Procházka
Hi. Simply add method like private String something; public String getSomething() { System.out.println(Call getSomething); return something; } to some model class which was generated by IBATOR without any modification of mapping xml. And try do some update or inserts with this model

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread mukhi
Your idea of passing a string value would not work out. I tried that since it is string SQL throws Invalid number exception. Do it in the following way. dynamic prepend= WHERE iterate property=choiceList open= CHOICE_REFNO IN( close=) conjunction=,#choiceList[]#

Re: Unable to get caching to work with IBatis - 3 (Build 242)

2010-04-13 Thread IceMan81
This works now. Thanks a lot Clinton! -Gesly Clinton Begin wrote: Known issue, fixed in trunk ant the next release. Here's the release files, although not officially released yet. :-) http://people.apache.org/builds/ibatis/ibatis-3-core/ibatis-core-3.0.0- bundle.zip Cheers,

Re: ..\migrate and strored procedures

2010-04-13 Thread Nathan Maves
this was already fixed in the latest code http://people.apache.org/builds/ibatis/ibatis-3-core/ibatis-core-3.0.0-bundle.zip On Tue, Apr 13, 2010 at 12:14 AM, Dmitry Mamonov dmitry.s.mamo...@gmail.com wrote: Hi everyone! I'm trying to apply ibatis-migrations to manage our database schema and I

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread cowwoc
Is there an equivalent way to do this in iBatis 3 with annotations? Gili On 13/04/2010 8:50 AM, mukhi wrote: Your idea of passing a string value would not work out. I tried that since it is string SQL throws Invalid number exception. Do it in the following way. dynamic prepend=

Re: how to pass two different types of values to query in IBATIS

2010-04-13 Thread Nathan Maves
Sure just name the parameters in your Mapper interface with @Param(foo) On Tue, Apr 13, 2010 at 12:00 PM, cowwoc cow...@bbs.darktech.org wrote:    Is there an equivalent way to do this in iBatis 3 with annotations? Gili On 13/04/2010 8:50 AM, mukhi wrote: Your idea of passing a string

Re: Ibatis 3 - special method in model class which Ibatis can't use

2010-04-13 Thread Jeff Butler
I just confirmed this to be true. It has nothing to do with Ibator. Clinton - the constructor for DynamicContext calls every getter in the parameter object regardless of whether it is used in the query or not.I suppose we should take a look at changing this somehow. Jeff Butler 2010/4/13

Re: Ibatis 3 - special method in model class which Ibatis can't use

2010-04-13 Thread Jeff Butler
I've got a fix for this - I'll commit shortly. Jeff Butler On Tue, Apr 13, 2010 at 3:34 PM, Jeff Butler jeffgbut...@gmail.com wrote: I just confirmed this to be true.  It has nothing to do with Ibator. Clinton - the constructor for DynamicContext calls every getter in the parameter object

Re: Ibatis 3 - special method in model class which Ibatis can't use

2010-04-13 Thread Jeff Butler
Fixed. https://issues.apache.org/jira/browse/IBATIS-777 Jeff Butler On Tue, Apr 13, 2010 at 4:04 PM, Jeff Butler jeffgbut...@gmail.com wrote: I've got a fix for this - I'll commit shortly. Jeff Butler On Tue, Apr 13, 2010 at 3:34 PM, Jeff Butler jeffgbut...@gmail.com wrote: I just

Enabling iBatis 3 logging

2010-04-13 Thread cowwoc
Hi, I'm getting this exception: [snip] operation: setValue org.apache.ibatis.exceptions.IbatisException: ### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near WHERE Position: 68 [snip] The annoying thing is I can't find

DefaultSqlSession.selectOne()

2010-04-13 Thread cowwoc
Hi, I hope I'm not reopening a hornet's nest but I just noticed the following comment in the code: // Popular vote was to return null on 0 results and throw exception on too many. How do you differentiate between selectOne() returning null because it found no rows versus it

Re: DefaultSqlSession.selectOne()

2010-04-13 Thread Clinton Begin
The definition of null is the absence of value and meaning. So regardless of whether it's a null column or no rows, no meaning should be applied to it. Thus these cases are the same. If you want meaning to come from the row, return a value, perhaps the row number. Clinton On 2010-04-13,

AW: Enabling iBatis 3 logging

2010-04-13 Thread Stephen Friedrich
Using this log4j configuration I am getting all sql statements added to the sql appender: !-- iBatis -- category name=com.ibatis additivity=false priority value=debug/ appender-ref ref=sql/ /category !-- iBatis also uses standard java.sql classes

Can't connect to Oracle DB when using rownum in iBatis3

2010-04-13 Thread 陈抒
Hello: I have a select statement like so: select id=getExemption parameterType=freebird.exemption.business.QueryCondition resultMap=exemptionResultMap select exemption.id