Searching for an example how to use Ibatis 3 without XML files

2010-03-18 Thread Pickelbauer, Martin
Hello, I'm searching for an full example on how to use Ibatis 3 without any XML files, so only with configuration settings in Java. Anyone a hint, where to find such an example? regards, martin

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread François Schiettecatte
Clinton Thanks for the information, and indeed my code creating the SqlSessionFactoryBuilder() and the SqlSessionFactory() is wrong, which I will fix. However there is an interesting issue around SqlSessionFactory() though, when you take into account page 5, SqlSessionFactory() is geared

mapping insert of object graph

2010-03-18 Thread Jon Finanger
Any way to map insertion of an object graph ? Or is manually insertion the only way -Jon - To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org

Re: Using iBatis to create a Postgres function - fails because of semi-colon

2010-03-18 Thread Collin Peters
You are correct. I can create the stored proc via iBatis via a unit test, but when I run it as a deployed webapp on Tomcat (using Java btw) it fails. So perhaps iBatis isn't to blame here, but hopefully I can be pointed in the right direction. The only thing that is really different between the

Re: mapping insert of object graph

2010-03-18 Thread Jeff Butler
Basically it's manual because SQL doesn't have a concept like join on insert. So you usually write a dao or service method like this: insertMasterRecord(); for each detail record { insertDetailRecord(); } commit(); Jeff Butler On Thu, Mar 18, 2010 at 8:05 AM, Jon Finanger j...@finanger.no

Ibatis sql-maps

2010-03-18 Thread kiran vuppla
Hi, I am using sql-maps and IBatis to do database related stuff. In my sql-maps most of them have ${} and #[]# for dynamic parameters created at run-time. I can only see the generated sql when I run my application. I would like to run the sql-maps (not through application) and would like to

Re: Using iBatis to create a Postgres function - fails because of semi-colon

2010-03-18 Thread Guy Rouillier
I'm focusing on the error message you received: unterminated dollar-quoted string. Since the code works via iBATIS in the unit test, it seems iBATIS is not the issue. Try switching your unit test to use TransactionAwareDataSourceProxy and see if it fails. If so, that will narrow your

Re: Ibatis sql-maps

2010-03-18 Thread shamim
you should try p6spy. kiran vuppla wrote: Hi, I am using sql-maps and IBatis to do database related stuff. In my sql-maps most of them have ${} and #[]# for dynamic parameters created at run-time. I can only see the generated sql when I run my application. I would like to run the

Re: Searching for an example how to use Ibatis 3 without XML files

2010-03-18 Thread shamim
public class TestConfig { public static void main(String[] args) { SqlSession session = null; try { // derby datasource setting EmbeddedDataSource ds = new EmbeddedDataSource(); ds.setDatabaseName(d:/DerbyDB); ds.setUser();

Examples from Czech User Group presentation

2010-03-18 Thread Ing . Jan Novotný
Hello everybody, I had a workshop at the Czech Java User Group a few weeks ago and with that occassion I've prepared several examples that show main points of new iBatis 3 functionality. There is also working preview of the Spring 3.1 iBatis integration (as available in issue

Re: Ibatis sql-maps

2010-03-18 Thread kiran vuppla
Thanks. Is it freeware? From: shamim sre...@yandex.ru To: user-java@ibatis.apache.org Sent: Thu, March 18, 2010 3:34:38 PM Subject: Re: Ibatis sql-maps you should try p6spy. kiran vuppla wrote: Hi, I am using sql-maps and IBatis to do database related

Re: Ibatis sql-maps

2010-03-18 Thread Nathan Maves
in the future please do not post to both email groups. keep these types of questions on the normal java interest list. On Thu, Mar 18, 2010 at 2:00 PM, kiran vuppla kirankumar_vup...@yahoo.com wrote: Thanks. Is it freeware? From: shamim sre...@yandex.ru To:

Re: Ibatis sql-maps

2010-03-18 Thread Chema
2010/3/18 kiran vuppla kirankumar_vup...@yahoo.com: Thanks. Is it freeware? I guess that you can use p6spy for, you must run your application. So, you could perform it with log4j Maybe you only need a dumb standalone Java client which calls your methods

Re: Ibatis sql-maps

2010-03-18 Thread kiran vuppla
Actually I don't like to write a java client too as I need to provide this to DBA to verify the SQL queries. He don't have any idea of Java. I would appreciate if there is something I can use without writing Java Code and get the generated SQLs from sql-maps. Thanks.

Re: Ibatis sql-maps

2010-03-18 Thread Chema
2010/3/18 kiran vuppla kirankumar_vup...@yahoo.com: Actually I don't like to write a java client too as I need to provide this to DBA to verify the SQL queries. He don't have any idea of Java. I would appreciate if there is something I can use without writing Java Code and get the generated

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread Clinton Begin
You can also use named environments to manage different databases. And yes, you'd need a single SqlSessionFactory for each -- but I wouldn't create them on demand. I'd instantiate them and keep them resident. Clinton 2010/3/18 François Schiettecatte fschietteca...@gmail.com Clinton Thanks

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread François Schiettecatte
Clinton Thanks for all the information, I reworked my code and am now keeping SqlSessionFactory(ies) around in a hash to create sessions from them as I need them. I will check into the named environments as you suggest. Meanwhile a suggestion would be to have a way to pre-parse the iBatis

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread Clinton Begin
It's already separate. If you look at the code, you can create a Configuration and pass it directly to the builder. Clinton 2010/3/18 François Schiettecatte fschietteca...@gmail.com Clinton Thanks for all the information, I reworked my code and am now keeping SqlSessionFactory(ies) around

Re: Missing commit after select won't update cache

2010-03-18 Thread lawouc
I'm experiencing the same issue as Björn. Can someone tell me if issuing a session.commit(); is the proper way to ensure the results of a query are cached? Is there any round trip to the database with an iBatis commit after a select? If not, then I'll modify my code to commit after every