hi all,
i would like to know how can i contact a string in insert statemnet using
ibatis?
insert into knet
(TRACK_ID,
STORE_ID,
order_id
DATE
)
values(
#trackId#,
#storeId#,
'abc'+#orderId#,
suprememenu wrote:
hi all,
i would like to know how can i contact a string in insert statemnet
using ibatis?
insert into knet
(TRACK_ID,
STORE_ID,
order_id
DATE
)
values(
#trackId#,
#storeId#,
Best option is to do it on the java side, otherwise you can use
'abc?orderId?' what will insert (sql inject!) the literal value of orderId
in your query
-Original Message-
From: suprememenu [mailto:shaik...@gmail.com]
Sent: 28 January 2010 11:55 AM
To: user-java@ibatis.apache.org
Subject:
hi ,
when i try 'abc?orderId?' this its inserting the data like
'abc?orderId?' directlly in the database.
meindert-3 wrote:
Best option is to do it on the java side, otherwise you can use
'abc?orderId?' what will insert (sql inject!) the literal value of orderId
in your query
hi ,
i mean its inserting the database but with value as abc?orderId it should
insert into db as abc123 (where 123 is the orderId)
suprememenu wrote:
hi ,
when i try 'abc?orderId?' this its inserting the data like
'abc?orderId?' directlly in the database.
meindert-3
Hi,
I solved the issue from java side .
thanks.
suprememenu wrote:
hi ,
i mean its inserting the database but with value as abc?orderId it
should insert into db as abc123 (where 123 is the orderId)
suprememenu wrote:
hi ,
when i try 'abc?orderId?' this its
hi all,
Can anyone can guide me how can i write the sql query in system.out?
This query is in a.xml file
select id=getDetailsId resultClass=Trans parameterClass=string
select sequenceId,
name,
lastname,
mobileNo,
from mytable where
That question comes up a lot, you can log the actual query if you switch
log4j logging on (see documentation) but
a) I wouldn't know a easy way to get the query back to your code
b) The query is parameterized, the parameter values are in the log
Meaning you can get the query string like
select
Use something like log4j and add something like this to your log4j.xml.
logger name=java.sql
level value=debug /
/logger
You will get something like this:
java.sql.PreparedStatement - {pstm-100028} Executing Statement:
SELECT * FROM EMP WHERE EMPNAME = ?
Hi all
I have notice an unusual behaviour of ibatis result object mapping.
Mapping a query result with a wrong ResultMap, no error is thrown.
My xml mapper is:
select id=getSizeItems resultMap=SizeResult
SELECT
SIZE_ID,
DESCRIPTION
FROM MY_TABLE
/select
My
In Oracle || is the string concatenation operator
'abc'||#orderId# should work.
suprememenu wrote:
suprememenu wrote:
hi all,
i would like to know how can i contact a string in insert statemnet
using ibatis?
insert into knet
(TRACK_ID,
STORE_ID,
order_id
This is a known feature of ibatis 3 :)
We have been talking about it but nothing has really come of it. The truth is
that the result class you are using must have, at least, the same properties
that are being returned. My current opinion is that we should have strict type
checking on result
Hi Nathan
tnx for you reply,
A strict type checking is a good feature to minimize the errors.
Are you planning to implement this check in the future?
Thanks a lot.
This is a known feature of ibatis 3 :)
We have been talking about it but nothing has really come of it. The truth is
that
Hello,
The CommitRequired attribute of transactionManager, present in iBatis 2
is no longer necessary in iBatis 3?
Quote from iBatis 2 manual:
The transactionManager element also allows an optional attribute
commitRequired that can be true or
false. Normally iBATIS will not commit
In iBATIS 3, you can use .commit(boolean force)
The advantage is that you need not incur the performance penalty for every
transaction, and also, it allows frameworks like spring to declaratively
configure transactions to be forcefully committed.
Your thoughts?
Clinton
On Thu, Jan 28, 2010 at
Hello Clinton,
No repair.
I just wanted some clarification on this matter.
Thank you.
On 28/01/2010 17:22, Clinton Begin wrote:
In iBATIS 3, you can use .commit(boolean force)
The advantage is that you need not incur the performance penalty for
every transaction, and also, it allows
iBatis 3.0-Beta-9 for Java.
I have done all of my iBatis configuration via annotations and need to
perform a select with a ResultHandler.
Using the AuthorMapper defined in the iBatis-3 Users Guide on page 54,
how would I add a result handler to selectAuthors()?
Paul Spencer
You can't call it through a mapper at this time. You can only call it
through the sqlSession#select() method.
That said, it might not be hard to add support for that.
Clinton
On Thu, Jan 28, 2010 at 2:22 PM, Paul Spencer pau...@apache.org wrote:
iBatis 3.0-Beta-9 for Java.
I have done all
18 matches
Mail list logo