Custom list implementation

2007-12-05 Thread MCCORMICK, Paul
Hello List, Is possible to choose what List implementation is returned when queryForList(...) is called. For example, suppose I have my own list implementation that extends ArrayList. Can I do the following MyCustomList lst = (MyCustomList)queryForList(myQuery, params); Currently what

RE: Lazy Load is pre loading 1-1 relationships

2007-09-12 Thread MCCORMICK, Paul
Be careful with lazy loading 1-1 relationships where the lazy loaded result could be null. A proxy object will be in its place. e.g. if ( foo.getBar() == null ) { // Bar is lazy loaded. // Unreachable code } From: Poitras Christian [mailto:[EMAIL

RE: Using discriminator with an interface

2007-09-03 Thread MCCORMICK, Paul
If the sub classes have a common setter method then its possible the use the that setter as the required single result in the result map. As you interface will not have setters you'll have to use any one of the sub classes (BlackSomething or WhiteSomething) as the class attribute in the main

Inner select statements in resultMaps

2007-07-03 Thread MCCORMICK, Paul
Dear List, I'm using lazy loading for inner select statements in results maps. Is it possible to hard code a parameter that's passed to the inner select statement. See below. I would like the string BIG_SPENDER to be passed to the query getOrderPayments. Is this possible? resultMap

RE: How to support read-only fields/paramters

2007-05-07 Thread MCCORMICK, Paul
Ibatis can use the private methods. E.g. If you define the method as private void setId(Integer id) {..} then ibatis can call it. Hope this helps, Paul -Original Message- From: Gordon Ross [mailto:[EMAIL PROTECTED] Sent: Monday, 7 May 2007 3:24 PM To: user-java@ibatis.apache.org

RE: Lazy load and serializable

2007-04-11 Thread MCCORMICK, Paul
' source code. But if I modify iBatis' source code, I have to maintain it. So if possible, I want to avoid it. So should I create jira? MCCORMICK, Paul wrote: You'll need to modify the ibatis source code. If your not using cglib then you only need to make the class LazyResultLoader serializable

Complex Property and ResultObjectFactory

2007-01-16 Thread MCCORMICK, Paul
I have a complex property thc in the result map below. resultMap id=... class=... result property=id column=ID/ result property=thc.fromHolding select=findFromHolding column={workItemId=WORKITEM_ID}/ result property=thc.toHolding select=findToHolding

RE: Complex Property and ResultObjectFactory

2007-01-16 Thread MCCORMICK, Paul
Documentation says this is fixed in IBATIS-366. I'm downloading it now to test. From: MCCORMICK, Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 January 2007 3:28 PM To: user-java@ibatis.apache.org Subject: Complex Property and ResultObjectFactory I have

RE: ResultSet ... getTimestamp with Calendar

2007-01-10 Thread MCCORMICK, Paul
You could use a TypeHandler. But this would not allow you to easily change the Calendar object that is used for the query. E.g. public class MyTimestampTypeHandler implements TypeHandlerCallback { private Calendar myCalendar = null; public Object getResult(ResultGetter arg0)

RE: iBatis Book - Lazy Loading Description

2007-01-04 Thread MCCORMICK, Paul
Setting lazyLoadingEnabled to true will allow the lazy loading 1 to many relationships. You don't have any 1 to many relationships in your code below. Setting enhancementEnabled to true will allow the lazy loading of 1 to 1 relationships. From: Kuntz, Tim

RE: Lazy Loading

2006-12-19 Thread MCCORMICK, Paul
You need to set enhancementEnabled=true and have cglib in you classpath. That will cause ibatis to use EnhancedLazyResultLoader. There is still some issues with 1:1 enhanced lazy loading. 1) If you use the discriminator tag to return 1:1 lazy loaded sub classes then you will not be able to

enhancementEnabled and lazyLoadingEnabled problem.

2006-09-24 Thread MCCORMICK, Paul
Title: enhancementEnabled and lazyLoadingEnabled problem. I have set enhancementEnabled=true and lazyLoadingEnabled=true in the SqlMapConfig A problem exists when the lazy loaded object is null. Using the enhancementEnabled=true option causes enhanced lazy loaded object to be returned from

RE: Parameterised constructors

2006-09-21 Thread MCCORMICK, Paul
{ private String foo; public String getFoo() { return foo; } private void setFoo(String foo) { this.foo = foo; } } On 9/20/06, MCCORMICK, Paul [EMAIL PROTECTED] wrote: How do private setters work? Could I set the 'foo' property using the result map below

RE: Parameterised constructors

2006-09-20 Thread MCCORMICK, Paul
How do private setters work? Could I set the 'foo' property using the result map below? Is there anything I have to do to the jmv to allow it access to the private field? resultMap class="Foo" result property="foo" column="FOOBA" /resultMap public class Foo { private String foo;

RE: Nested Bean in Result Map

2006-08-18 Thread MCCORMICK, Paul
Title: Message If you have a nested bean then use a nested result map. You will need to usethe 2.2.0 beta release. It wont work with 2.1.7. resultMap id="NestedBeanRM" class="PageBean"result property="address1" column="ADDRESS1" / result property="address2" column="ADDRESS2" //resultMap

RE: JIRA 225 and discriminator tag.

2006-08-04 Thread MCCORMICK, Paul
and unit test for this problem. Get the new source from SVN and let me know how it works for you. Jeff Butler On 8/1/06, MCCORMICK, Paul [EMAIL PROTECTED] wrote: ok, thanks. I'll leave it to you then. From: Jeff Butler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 2

JIRA 225 and discriminator tag.

2006-08-01 Thread MCCORMICK, Paul
Title: JIRA 225 and discriminator tag. Hi, I've downloaded the latest ibatis code from SVN last week as I needed the following feature: http://issues.apache.org/jira/browse/IBATIS-225 I have encountered a problem. The reused result map ignores the discriminator tag. I've attached some

RE: JIRA 225 and discriminator tag.

2006-08-01 Thread MCCORMICK, Paul
to add the test case to the JIRA ticket. Jeff Butler On 8/1/06, MCCORMICK, Paul [EMAIL PROTECTED] wrote: Hi, I've downloaded the latest ibatis code from SVN last week as I needed the following feature: http://issues.apache.org/jira/browse/IBATIS-225 I have encountered a problem

SVN Repository

2006-07-24 Thread MCCORMICK, Paul
Title: SVN Repository Hi, There are some improvements since the 2.1.7 release that I would like to use. How can I download the latest source code. I've tried mapping a web folder to http://svn.apache.org/repos/asf/ibatis/trunk/ but I am prompted for a password. Any idea on how stable is

RE: SVN Repository

2006-07-24 Thread MCCORMICK, Paul
is fairly stable - all the tests pass. Jeff Butler On 7/24/06, MCCORMICK, Paul [EMAIL PROTECTED] wrote: Hi, There are some improvements since the 2.1.7 release that I would like to use. How can I download the latest source code. I've tried mapping a web folder to http

RE: SVN Repository

2006-07-24 Thread MCCORMICK, Paul
: Tuesday, 25 July 2006 11:55 AMTo: user-java@ibatis.apache.orgSubject: Re: SVN Repository Don't you have an HTTP proxy? Or does it require web auth? On 7/24/06, MCCORMICK, Paul [EMAIL PROTECTED] wrote: Thanks. I was hoping a firefox extension or something browser based. None of the free

RE: URGENT ::: Caused by: java.lang.NoSuchMethodError: oracle.sql.STRUCT.toClass(Ljava/lang/Class;Ljava/util/Map;)Ljava/lang/Object;

2006-07-14 Thread MCCORMICK, Paul
Hi Chaithanya, Is you second name really ibatis? From: chaithanya ibatis [mailto:[EMAIL PROTECTED] Sent: Friday, 14 July 2006 2:29 PMTo: user-java@ibatis.apache.orgSubject: URGENT ::: Caused by: java.lang.NoSuchMethodError:

How can I reuse a resultMap.

2006-07-12 Thread MCCORMICK, Paul
Title: How can I reuse a resultMap. I have a resultMap I use to populate a Name object. Here is the class and result map. public class Name { public Integer name_id } public class

Capability to use dynamic sql within iterates

2006-05-04 Thread MCCORMICK, Paul
Title: Capability to use dynamic sql within iterates Hello I have read Issue 148 and it looks like I can use dynamic sql within an iterate tag http://issues.apache.org/jira/browse/IBATIS-148 I have a problem when I set the property on a tag to be a value on the iterated object. See

RE: Capability to use dynamic sql within iterates

2006-05-04 Thread MCCORMICK, Paul
to work in the sistuation below? Thanks, Paul From: MCCORMICK, Paul [mailto:[EMAIL PROTECTED] Sent: Friday, 5 May 2006 11:23 AMTo: user-java@ibatis.apache.orgSubject: Capability to use dynamic sql within iterates Hello I have read Issue 148 and it looks like I can use dynamic sql within

RE: Two quick questions..

2006-04-19 Thread MCCORMICK, Paul
Title: Two quick questions.. I'll add to those questions 1) Be careful when updating cached data in a transactional environment. If you update a cached object, then calling a rollback will undo db changes but not changes to the object in memory. You should clone cached object before

RE: CTH - column name

2006-03-28 Thread MCCORMICK, Paul
Title: Message You can't get access to the column name. I've tried before.Its a private field on the ResultGetterimplementation object. If only there was a getter method on the ResultGetter interface. Now that's an idea... Paul From: Balaji [mailto:[EMAIL PROTECTED] Sent: Wednesday, 29

RE: Optimistic locking question

2006-03-15 Thread MCCORMICK, Paul
Instead of using a timestamp I use an integer and increment the value on every update. update customer set NAME= #name#, VERSION_ID = VERSION_ID + 1 where ID = #ID# and VERSION_ID = #VERSION_ID# Then in the Dao I would increment versionId value on the CustomerDTO object if the update

Nested iterate tag

2006-02-02 Thread MCCORMICK, Paul
Title: Nested iterate tag Is it possible to nest iterate tags so I can traverse a list of lists? For example: iterate property=A iterate property=A[].B #A[].B[].field# /iterate /iterate Thanks, Paul McCormick IT Consultant DEPARTMENT OF INDUSTRY AND RESOURCES 100

RE: ResultSet metadata

2005-07-08 Thread McCORMICK, Paul
I've got a similar problem. I have a immutable Quantity object that takes two arguments for its constructor. No of the Quantity properties can be populated using setter methods. I would like to use a custom type handler to construct the object. Doing reflection on the result set will not