..\migrate and strored procedures

2010-04-12 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: Unable to get caching to work with IBatis - 3 (Build 242)

2010-04-12 Thread Clinton Begin
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, Clinton On Mon, Apr 12, 2010 at 4:22 PM, IceMan81 wrote: > > Hi, > I am using IBa

Re: Ibatis Mysql Sql error but sql runs fine

2010-04-12 Thread Nate Weiss
I am creating a table dynamically. CREATE TABLE #tableName# ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Hi-- Try $tableName$ rather than #tableName# See page 32 here for more: http://svn.apache.org/repos/asf/ibatis/java/ibatis-2/trunk/ibatis-2-docs/en/iBATIS-SqlMaps-2

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

2010-04-12 Thread IceMan81
Hi, I am using IBatis-3 build 242 (the latest available on the website) and I find that though I set a cache policy, there is no caching being done by IBatis. In my mapper XML file I have the following line for cache configuration. I have a function getStrategies() as seen below. List ge

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

2010-04-12 Thread IceMan81
Hi, I am using IBatis-3 build 242 (the latest available on the website) and I find that though I set a cache policy, there is no caching being done by IBatis. In my mapper XML file I have the following line for cache configuration. I have a function getStrategies() as seen below.

Re: Ibatis Mysql Sql error but sql runs fine

2010-04-12 Thread Larry Meadors
Try $tableName$. On Mon, Apr 12, 2010 at 4:17 PM, Corporate Tool wrote: > > I am creating a table dynamically. > > >         CREATE TABLE #tableName# ( >         id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, >         symbol CHAR(3), >         date DATE, >         time TIME, >         INDEX(time),

Ibatis Mysql Sql error but sql runs fine

2010-04-12 Thread Corporate Tool
I am creating a table dynamically. CREATE TABLE #tableName# ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, symbol CHAR(3), date DATE, time TIME, INDEX(time), open_price INT, close_price INT, low_price INT, h

Re: return simple String[] or List

2010-04-12 Thread Nathan Maves
Tomas, I am assuming that you have not read the developers guide and I just giving things a go. You need to read the guide completely. In this case Guy was saying that if your query only returns a string then set the resultType to String. Then use the ibatis queryForList() to compile your resul

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

2010-04-12 Thread Nate Weiss
On 4/12/2010 10:24 AM, mukhi wrote: Thanks, but the parameter 'entryrefno' is of numeric type in my table. How can i pass two different types of values to Map at the same time? Please reply me. I am struck at this point. If you added that numeric value to your map before you passed it in, li

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

2010-04-12 Thread Clinton Begin
Example? 2010/4/12 Tomáš Procházka > Hi. > > I found some problem. I need have special method in model class which do > some lazy initialization which can't be called from iBatis mapper. But > problem is, that iBatis call all getXyz methods during insert or updated, > also if I don't specify thi

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

2010-04-12 Thread François Schiettecatte
There you go, much cleaner, thanks for correcting me, I had not used that particular functionality before. François On Apr 12, 2010, at 11:00 AM, Martin Ellis wrote: > 2010/4/12 François Schiettecatte : >> I think Mukhi is trying to pass a string and an array of numbers, the string >> being th

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

2010-04-12 Thread Martin Ellis
2010/4/12 François Schiettecatte : > I think Mukhi is trying to pass a string and an array of numbers, the string > being the entryRefno and the list of nunbers to be added to the IN() clause > of the SELECT statement in the example given. > > The Map is the way to go, you just need to add the st

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

2010-04-12 Thread François Schiettecatte
I think Mukhi is trying to pass a string and an array of numbers, the string being the entryRefno and the list of nunbers to be added to the IN() clause of the SELECT statement in the example given. The Map is the way to go, you just need to add the string as shows in the code sample below. The

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

2010-04-12 Thread Nathan Maves
I am not sure you are grasping the concept here. Both IB2 and IB3 can take any type of java.util.Map implementation as a parameter. Map parameters = new HashMap(); parameters.put("someNumber", Integer.valueOf(123)); parameters.put("someString", "hello"); Now use that parameter as the single para

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

2010-04-12 Thread mukhi
Thanks, but the parameter 'entryrefno' is of numeric type in my table. How can i pass two different types of values to Map at the same time? Please reply me. I am struck at this point. Nate Weiss wrote: > > Hi mukhi-- > > I'm pretty new to this list, but I believe the general solution is to