Re: I would like to create a sql map dynamically

2009-02-11 Thread Jiming Liu
$fullsql$ Is this ok for you?

Re: I would like to create a sql map dynamically

2009-02-11 Thread Jiming Liu
Using $param$ in sql. You can search document for details On Thu, Feb 12, 2009 at 4:59 AM, Vorius wrote: > > Is it possible to create a sql map dynamically? > > I was reading about a method of creating an xml stream in memory and > passing > that to Ibatis but I was hoping of a way of doing i

Re: Performance & SQL Formatting Issue

2009-02-02 Thread Jiming Liu
Hi Clinton, BTW, I suggest you could consider expose interface like SqlChild to users, so that users could inject their own implementations. Thanks, Jiming On Tue, Feb 3, 2009 at 1:22 PM, Jiming Liu wrote: > Hi Clinton, > > I suppose formatted sql is slow might be caused by databa

Re: Performance & SQL Formatting Issue

2009-02-02 Thread Jiming Liu
Hi Clinton, I suppose formatted sql is slow might be caused by database engine waste time to parse the white space, not only \r,\n,\t, but ' ' as well. And actually ' ' is more than the other three white in real world. So I recommend following code, public static String tidySql(String sql)

Re: [VOTE] Should iBATIS support SQLJ?

2009-01-23 Thread Jiming Liu
-5, it is a dying technology.

Re: Interface binding

2008-11-05 Thread Jiming Liu
ibatis dynamic proxy On Wed, Sep 10, 2008 at 5:06 AM, Ron Chan <[EMAIL PROTECTED]> wrote: > > Here's a quick and dirty DynamicMapper I created > > MyDao myDao = dynamicMapper.daoProxy(MyDao.class) > creates the proxy implementation > > I use Guice for DI and have a Guice provider for this and tha

Re: Avoid java heap space while using iBatis

2008-10-21 Thread Jiming Liu
I suggest you can write/dump the records to a temp file and then implement an Iterator to read the record one after another. from the file. Best regards, Jiming Liu On Tue, Oct 21, 2008 at 10:30 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > Our project is facing a java heap sp

Re: [Feature request] add one more parameter to execute sql method

2008-08-06 Thread Jiming Liu
ok, thanks:) On Wed, Aug 6, 2008 at 9:49 PM, Clinton Begin <[EMAIL PROTECTED]>wrote: > Well just don't call it "parameterObject" ... "param" or even just "p" is > fine. It's not like it can be easily confused with anything else. :-) > >

Re: [Feature request] add one more parameter to execute sql method

2008-08-06 Thread Jiming Liu
# ) On Wed, Aug 6, 2008 at 2:17 PM, Clinton Begin <[EMAIL PROTECTED]>wrote: > Insert a proxy SqlMapClient implementation that does the wrapping for you. > > > Cheers, > Clinton > > > On Wed, Aug 6, 2008 at 12:09 AM, Jiming Liu <[EMAIL PROTECTED]> wrote: > >>

[Feature request] add one more parameter to execute sql method

2008-08-05 Thread Jiming Liu
Hi Clinton, I have been thinking about defined a sharding architecture for a while by using iBatis. And I found if iBatis core lib could add some serveral more methods, it would be more helpful. As following, Object insert(String statementName, Object parameterObject, Object sharding) Object

Re: using a parameterClass and also passing some additional params..

2008-05-28 Thread Jiming Liu
I vote for this feature for version 3! On Wed, May 28, 2008 at 10:43 PM, apinke <[EMAIL PROTECTED]> wrote: > > Hi , > > I am using a abator generated Insert statement whose parameterClass is a > JavaBean class. > > (psuedo syntax) > > >insert into MYTABLE.. ..values > (#appName:VARCHAR#,...

Re: JavaBean and Map parameters

2007-09-03 Thread Jiming Liu
I dont know how iBatis set the properties of a bean. In case it uses reflection, it surely will slower than hashmap. But if it uses the bean.set...(...) directly, i believe it is faster than hashmap. Jiming On 9/3/07, Larry Meadors <[EMAIL PROTECTED]> wrote: > > I don't know about the performan

Re: [ibatis2]can I use a class with inner classes as resultMap?

2007-08-01 Thread Jiming Liu
public class GEElementStyleBean { ... public LableStyle getLableStyle() { if(null==labelStyle) lableStyle=new LabelStyle(); return lableStyle; } ... } On 8/1/07, Brandon Goodin <[EMAIL PROTECTED]> wrote: > > I'm not seeing where you initialize your inner classes. All I see is the > following..

Fwd: Batch insert using Mysql, id property did not get out

2007-07-11 Thread Jiming Liu
-- Forwarded message -- From: Jiming Liu <[EMAIL PROTECTED]> Date: Jul 10, 2007 11:47 PM Subject: Batch insert using Mysql, id property did not get out To: user-java@ibatis.apache.org Hi guys, There have an id, which is auto_increment filed in table city of a mysql db

Batch insert using Mysql, id property did not get out

2007-07-10 Thread Jiming Liu
Hi guys, There have an id, which is auto_increment filed in table city of a mysql db . The insert("insertCity", v); method works correct, since it works fine in non-batch mode. But in the following batch code. All the id is 0, which is initilized by -1. That means iBatis do set the value but do

Re: iBATIS Survey (10 Minutes)

2007-07-09 Thread Jiming Liu
I filled the survery, but forgot fill a suggestion. What do you guys think using EHCache take place of OSCache in next version? I think EHCache is more clear and powerful than OSCache and some benchmarks say EHCache is much faster. BTW, Spring use EHCache by default. Best regards, Jiming

Re: Which to choose : iBatis or Hibernate

2007-07-05 Thread Jiming Liu
Using Hibernate, you have a high learning curve, so I think iBatis is OK. On 7/6/07, Henry Lu <[EMAIL PROTECTED]> wrote: iBatis is the way to go. -Henry Ashok Madhavan wrote: > Hi All, > > we are presently using iBatis in one of our project. In that project > there are lots of objects which n

Re: auto-generated keys in Oracle

2007-05-16 Thread Jiming Liu
It works, thank you very much. On 5/16/07, Niels Beekman <[EMAIL PROTECTED]> wrote: Use the keyProperty attribute of selectkey… -- *From:* Jiming Liu [mailto:[EMAIL PROTECTED] *Sent:* woensdag 16 mei 2007 12:28 *To:* user-java@ibatis.apache.org *Subject:

auto-generated keys in Oracle

2007-05-16 Thread Jiming Liu
hi guys, I was trying to use auto-generated key in oracle by iBatis. But it just do not work. I used the feature in Mysql, it works. Is it a bug of iBatis 2.3.0.677? here is my iBatis config part SELECT SEQ_FOO.NEXTVAL AS ID FROM DUAL INSERT INTO foo (id, name) VALUES(#id#, #name#) It c