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
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
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
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
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
' 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
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
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
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)
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
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
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
{
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
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;
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
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
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
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
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
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
: 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
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:
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
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
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
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
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
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
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
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
30 matches
Mail list logo