Is there a way to configure iBatis Java to use a factory class (or,
better, instance) to create result objects instead of Class.newInstance
method?
For example, I want to initialize my objects, i.e. set a property to
refer to a particular object of my application.
In general I can do this in my
This is already filed in JIRA, you could vote for it:
http://issues.apache.org/jira/browse/IBATIS-50
Niels
-Original Message-
From: Oleg Shpak [mailto:[EMAIL PROTECTED]
Sent: woensdag 24 augustus 2005 10:51
To: user-java@ibatis.apache.org
Subject: Factories to create result objects
Is
Hi
I am new to this list and iBATIS, but have started to use it (embedded
within the tapestry framework) for building a small database application at
home.
I have read the developers guide, in an attempt to get straight how I am
going to use iBATIS to meet my needs, and most of it seems very
Wow, lots of good questions.
Starting with the easiest - the namespace attribute is used to
logically group sqlmap elements - for example, you can define a
"Product" namespace for mapped statements and related items that are
to be used when working with products. That is done by setting the
useSta
Hi all,
This is a test of the mailing lists.
Will one PMC member please respond from each list?
Thanks,
Clinton
We're back. :)
On 8/24/05, Clinton Begin <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> This is a test of the mailing lists.
>
> Will one PMC member please respond from each list?
>
> Thanks,
> Clinton
>
[Looks like my first post got lost when the list went down :-/]
Hi,
I'm a newbie to iBatis and as part of some unit-testing I need to confirm
that the correct number of rows are deleted when removing some records.
If do
delete from X where id=#value#;
delete from Y where id=#value#;
I get
I am in the process of re-writing some batch processes (that run outside of an
app server) and would like to use iBatis as the persistence framework.
My requirements are as follows:
1. the process will spawn multiple threads and each thread needs its own
connection. how is this handled in ibati
Hi there!
Have you tried with FK and cascade delete ?
Which means one delete statement, but "behind" the scene, deletes in several
tables,
the number of deleted rows should then be correct ?
Erlend
---
[Looks like my first post got lost when the list went down :-/]
Hi,
I'm a newbie to i
Speaking from oracle experience I believe that it only return the
number of row deleted from the primary table and not the dependent
tables.
Nathan
On Aug 24, 2005, at 9:47 AM, [EMAIL PROTECTED] wrote:
Hi there!
Have you tried with FK and cascade delete ?
Which means one delete statement,
On 8/24/05, Rafiq, Adnan <[EMAIL PROTECTED]> wrote:
> 1. the process will spawn multiple threads and each thread needs its
> own connection. how is this handled in ibatis? does each thread
> automatically get its own connection or do I need to write more code?
That is the default behavior, yes.
Well, I decided to just encapsulate the desired functionality on my own
rather than mess with the iBATIS code.
package com.whitesandsolutions.base;
import com.ibatis.dao.client.DaoManager;
public class TransactionManager {
private static class ThreadLocalTXCount extends ThreadLocal {
Larry Meadors writes:
...
The groupBy attribute is used to deal with the "N+1" selects problem.
The "N+1 Selects" problem is caused by trying to load child records
that are related to a list of parent records. So, if you run one query
to get the parent records, and there are some number "N" of
You got it exactly right. :-)
Larry
On 8/24/05, Alan Chandler <[EMAIL PROTECTED]> wrote:
> Larry Meadors writes:
>
> ...
> >
> > The groupBy attribute is used to deal with the "N+1" selects problem.
> > The "N+1 Selects" problem is caused by trying to load child records
> > that are related to
Larry:
Thanks for the reply. One more question, and I am pretty sure thats how iBatis
works, but won't hurt asking:
In the same thread, when using JDBC TX Manager, does iBatis only create one
connection and re-use it for all JDBC calls to the database?
Thanks,
- Adnan
-Original Message--
Well I think each time you commit (or rollback) AND start new
transaction you will get connection from the pool which of course may
be different one.
So if some of your threads are commiting/rollbacking:
> some batch processes may do commits in the middle of processing
they can be getting differen
I´m trying to insert some decimal values in a table at oracle
database. But the decimal part of the value is not recorded.
Like if try to record 325.34 the value that is recorded is 325 only
the integer part. How can i solve this problem?
tks
Usually it's one of 2:
- check your table definition in Oracle whether the column you insert
to can contain a decimal part. Try to insert a decimal value via
SQL*Plus e.g. ... if that doesn't work that's the error.
- Maybe you're using Integers to pass parameters to iBATIS which would
cut your d
Sven,
The first one is not because the insert made using sqlplus is working fine.
I´m passing the float value using the Float wrapper. And it´s not
working. Do you think that this problem have anything to do with a old
version of Ibatis, because in this project we are using an old one?
tks.
Renato,
You're not giving much to work with... which version of iBATIS do you
use? Can you possibly upgrade to 2.1.5. and try that. Can you supply
the piece of java code you use + your maps.
Regards,
Sven
On Wed, 24 Aug 2005 15:34:00 -0300, you wrote:
>Sven,
>
>The first one is not because th
Sven,
This file attached has the XML mapping and the java code. I try to
user hashMap and the parameterClass (FaixaLimite) and both didn´t
work.
The release that I´m using is 2.0.6.
tks
On 8/24/05, Sven Boden <[EMAIL PROTECTED]> wrote:
>
> Renato,
>
> You're not giving much to work with
Sven,
This file attached has the XML mapping and the java code. I try to
user hashMap and the parameterClass (FaixaLimite) and both didn´t
work.
The release that I´m using is 2.0.6.
tks
On 8/24/05, Sven Boden <[EMAIL PROTECTED]> wrote:
>
> Renato,
>
> You're not giving much to work with
Assuming now it's about "valorLimiteSuperiorFaix"... print out the
value from it right before "insert("inserirFaixaLimiteCampanha",
faixa);".
Something as:
System.out.println(faixa.getValorLimiteSuperiorFaixa());
If that doesn't show a truncated value, I can't help you without much
more infor
Ok Sven, I´ll try to find out.
Tks for your help.
On 8/24/05, Sven Boden <[EMAIL PROTECTED]> wrote:
>
> Assuming now it's about "valorLimiteSuperiorFaix"... print out the
> value from it right before "insert("inserirFaixaLimiteCampanha",
> faixa);".
>
> Something as:
>System.out.println(
I hate to hijack Alan's question, but...
I've been playing around with group by as well. I fully understand the N+1
selects problem and understand how groupBy works.
Lets simplify your problem just a simple relationship - say account to order
(disregarding line items).
Now if an account has no
Shouldn't you do that yourself in the POJO ? If you assume this behavour
in your apps, it wouldn't be a good idea to rely on ibatis to give it to
you. What if you create the pojo manually ? then you wouldn't get the
empty list. Something like
if (myList == null) {
myList = new List()
}
retu
All,
Given the following:
create table application_user (
user_name varchar(35) not null,
password varchar(255) not null,
first_name varchar(50) not null,
last_name varchar(50) not null,
email varchar(255) not null,
password_hint varchar(255),
27 matches
Mail list logo