Re: Transaction using connection from an external Datasource

2005-06-22 Thread Clinton Begin
That should work.  I'm glad to see you're using sessions instead of setUserConnection() --don't go there. If anything, you're doing more work than is necessary.  Consider the following (granted I know nothing of your actual environment): //no need to regrab these every time... private SqlMapClie

Re: How do I pass custom EntityResolver to SqlMapClientBuilder?

2005-06-22 Thread Clinton Begin
You can't pass a custom one yet, but it's a great idea for a new feature.  Add it to JIRA to make sure it's tracked.  I have a feeling we'll be gearing up for another release soon. That said, we're also going to be making the entity resolver smarter, to solve some of the current issues with  dom

Re: Update with two beans

2005-06-22 Thread Clinton Begin
I have no idea what you're doing, but it looks like it should "work" (whatever it is...).  ;-) Cheers, Clinton On 6/22/05, Lurtz Ugluk <[EMAIL PROTECTED]> wrote: Hi,how can I do an update with two parameter beans andwithout a resultmap??Something like this:Hashtable hm = new Hashtable();hm.put("s

Re: Avoiding N+1 selects with more complex graphs

2005-06-22 Thread Clinton Begin
There's no limit.  You can go as wide or deep as you like.  You can load any graph of practical limit (i.e. ridiculous graphs won't likely perform well).  But certainly this is possible.  The unit test actually uses a three tier nesting. Cheers, Clinton On 6/22/05, Aaron Craven <[EMAIL PROTECTED]

Re: dynamic query template?

2005-06-22 Thread Brandon Goodin
I'm curious what _would_ be considered elegant? Anyway, the solution you provided should be fine. Be sure to use remapResults="true". The other route is simply to duplicate the two queries so that they present cleaner and you don't need ot place a count boolean into your parameter object. Brandon

dynamic query template?

2005-06-22 Thread Fabien Le Floc'h
Hi, I was wondering what would be the best way to write 2 queries that share almost everything with iBatis. For example if I want to do SELECT * FROM user_tbl [...] WHERE category="admin" AND ... LIMIT 50 SELECT COUNT(*) FROM user_tbl [...] WHERE category="admin" AND ... ideally one would have

RE: DaoException

2005-06-22 Thread Sagar Naik
Thxs, I got the answer After a careful look, I found the mistake By mistake , I wrote the name of the class and not of the interface in getDAO call Thxs --- "Mitchell, Steven C" <[EMAIL PROTECTED]> wrote: > It doesn't sound like it found the DAO interface you > passed to the > DaoManager in your

Re: Saving a list

2005-06-22 Thread Brandon Goodin
1 line of code versus 4. Doesn't appear to be a big issue. Simply wrap it in a transaction and have at it. Brandon On 6/22/05, Paulo Neves <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm doing an application using iBatis. > My question is, is possible to save a list ? > > Example: > business objs:

Re: Avoiding N+1 selects with more complex graphs

2005-06-22 Thread Aaron Craven
Not a terribly big hurry, exactly. We are attempting to make some architectural decisions about an application we're writing, and at the moment are trying to make a choice between hibernate and iBATIS. I'm simply trying to fully understand what each framework offers. (No small task!) We are me

RE: DaoException

2005-06-22 Thread Mitchell, Steven C
It doesn't sound like it found the DAO interface you passed to the DaoManager in your DAO.xml file. -Original Message- From: Sagar Naik [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 1:25 PM To: user-java@ibatis.apache.org Subject: DaoException Hello Sire, I get this exceptio

Saving a list

2005-06-22 Thread Paulo Neves
Hi all, I'm doing an application using iBatis. My question is, is possible to save a list ? Example: business objs: class Relation { Integer relId; String name; } class Contact { Integer contactId; String name; ... List relationsList; } How can I save one contact that

DaoException

2005-06-22 Thread Sagar Naik
Hello Sire, I get this exception when trying to acess MySQL I m tryting to devleop in the line of jpetstore Can u pl help with this? Can u pl tell me wth is wrong ? com.ibatis.dao.client.DaoException: There is no DAO implementation found for class org.questforum.fwork.db.UserDAO in any context.

DaoException

2005-06-22 Thread Sagar Naik
Hello Sire, I get this exception when trying to acess MySQL com.ibatis.dao.client.DaoException: There is no DAO implementation found for class org.questforum.fwork.db.UserDAO in any context. If you've registered multiple implementations of this DAO, you must specify the Context ID for the DAO imp

Re: Avoiding N+1 selects with more complex graphs

2005-06-22 Thread Larry Meadors
I know you could do this with a rowhandler, but have not tried it using the groupBy attribute. If you are not in a great big hurry, I will be looking at this in a couple of days (possibly this weekend). Larry On 6/22/05, Aaron Craven <[EMAIL PROTECTED]> wrote: > > I cannot decide if I've misse

Avoiding N+1 selects with more complex graphs

2005-06-22 Thread Aaron Craven
I cannot decide if I’ve missed something in the documentation, or if I’m just plain old confused, but either way I need some help. With iBATIS 2, I realize the N+1 selects problem has been solved by the addition of the groupBy property. However, I’m a bit confused as to how this would be done

AW: Content is not allowed in prolog

2005-06-22 Thread Andre Peterka
Hi Steven I think I had a similar Problem when using iBatis on BEA Weblogic 6.1 a while ago. The reason for the error was a crippled version of an XML Parser that Weblogic had packaged in their jar. This Parser was picked up before the before the applications parser. The solution was to confi

RE: Content is not allowed in prolog

2005-06-22 Thread Mitchell, Steven C
Brice, Thanks for the suggestion. I agree, it's not really an iBatis issue. We've double checked all the XML files for leading spaces, they were fine, and re-saved them with a plain text editor. Those have been sent to our admin group for redeployment and testing. I'm not sure how to check de

Re: Content is not allowed in prolog

2005-06-22 Thread Brice Ruth
It probably is an encoding problem. Most likely having to do with the platform default encoding. It is possible that Java/AIX is reading it using a different default platform encoding than RAD on XP. It can be tricky to resolve this, but as others have mentioned, it isn't really an iBATIS issue. I

Re: Content is not allowed in prolog

2005-06-22 Thread Jeff Butler
We have your exact setup - WAS 5.1 on AIX, RAD 6.0 on XP. We have no issues with iBatis. We are not using DAO, only SqlMaps. We are using iBatis 2.0.9b. Our config files are encoded UTF-8. This probably isn't much help to you, but I though I'd let you know that it should work in your scenario.

Re: Content is not allowed in prolog

2005-06-22 Thread Larry Meadors
This really is not an iBATIS issue, but I suspect you must need to somehow edit the XML in a plain text editor, and make sure there are no unicode charaters in it, and that the very first line begins with wrote: > > We recently starting developing with iBatis (I have used it before at other > si

Content is not allowed in prolog

2005-06-22 Thread Mitchell, Steven C
Title: Message We recently starting developing with iBatis (I have used it before at other sites).  It runs fine on a WebSphere 5.1 under Rational Application Developer 6.0 on Windows XP; however, when we try to deploy to WebSphere 5.1 on AIX iBatis will not load and we get the following er

Update with two beans

2005-06-22 Thread Lurtz Ugluk
Hi, how can I do an update with two parameter beans and without a resultmap?? Something like this: Hashtable hm = new Hashtable(); hm.put("setBean", setBeanObject); hm.put("whereBean", whereBeanObject); sqlMap.update("update", hm); And in the xml?? I'm putting this, but I have errors UPD