Hallo,
I'am using Ibatis 2.3.0.677. Under certain circumstances properties of
the result class are not set, although contained in the result map. This
happens, when the only property of a result map is mapped to a result
map. The essence is, that
resultMap id=resultIdOnly class=Type2
I'am using iBatis 2.3.0.677 with Spring 2.5.2.
spring.jar (2008-03-01)
aspectjweaver.jar (v. 1.5.4 I think)
cglib-nodep-2.1_3.jar
Ian Zabel schrieb:
I've seen some recent traffic on this list saying that Spring is
incompatible with iBatis 2.3.x. Is this still the case, or have these
issues
Hello,
I found a behaviour in iBATIS, what I don't unterstand. Dependend on the
list of properties selected in a statement joining 3 tables the
execution of a nested result map results in an instantiation or not.
iBATIS: 2.3.4.726
Spring: 2.5.2
I have 3 tables (I omit the unnecessary
Hello,
I found the reason for my problem is the following method in class
ResultMap, line 310:
public Object[] getResults(StatementScope statementScope, ResultSet rs)
throws SQLException {
...
boolean foundData = false;
Object[] columnValues = new
at 6:37 AM, Ingmar Lötzsch
[EMAIL PROTECTED] wrote:
Hello,
I found the reason for my problem is the following method in class
ResultMap, line 310:
public Object[] getResults(StatementScope statementScope, ResultSet rs)
throws SQLException {
...
boolean foundData = false;
Object
Hi,
I'm using JSF 1.2 (with backwards combatibility for 1.1), Spring 2.5.2,
and iBATIS 2.3.4.726. My configuration contains the following:
web.xml
...
listener
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
listener
Could I use an update statement using a parameterMap and a
parameterClass ? How to use a parameterClass property?
Example:
update id=update1 parameterMap=personMap parameterClass=Person
UPDATE Person SET name=?,lastname=? WHERE id = (how to reference the
value from parameter class Person
problem: I wish to get the production of a client through different period
of times.
the simple most sql will be:
*** SQL **
SELECT client_ID, SUM(production) , #date1# AS start_date, #date2# AS
end_date
FROM client_production
WHERE client_ID=33293
AND production_date
Anyone run into mapping an unsigned BIGINT? I don't see how its possible
in Java?
Why can't you use Long or long?
Petr V. schrieb:
Any idea what is going on ? :-( It is straight forward code
==
resultMap class=Job id=JobResult
result column=JOB_ID jdbcType=INTEGER property=jobId /
result column=STATUS jdbcType=INTEGER javaType=JobStatusEnum
Actually I was simplifying the context from 1-M to 1-1 for discussion so
left groupBy attribute mistakenly.
The problem at hand is that Teacher has students (1:M). Student must
have some teacher assigned to him but teacher does not necessarily need
to have some student.
So I go ahead and
Hello Rahul,
I am very new to Ibatis so I need some help in regard to, How I can
register my ArrayToStringtypehandlercallback for a particular field.
1) I know that I can declare my typehandler in sqlmapConfig file but if
I do so, that means declaring it for every parameter of the same
Hello Rahul,
here an example for Date[]/date[]
Can any one tell me how to use typehandlercallback implementation with
sqlmap while doing insert
public void insert(Planschichteinheit record)
{
getSqlMapClientTemplate().insert(planschichteinheit.insert, record);
}
and one more
Hello Rahul,
Really appreciate your response, Well I do need to bother you for one more
thing if you could tell me where exactly do I need to insert the following
statement (In my sqlmap-config.xml file or under my resource file).
typeAlias alias=DateArrayTypeHandler
Hello, Rahul
if (null == order.getOrderId()) {
sqlMapClient.insert(Order.insert, order);
} else {
sqlMapClient.update(Order.update, order);
}
As I was going through above code I have few question why are checking
it against null for insert , shouldn’t that be checking for not null
Hello Rahul,
I am Using postgresSql As my DB and I am using auto-generated keys as my way
to create new ID which is as follows:
insert id=MSCPerfCntrMscMMSTblImpl
parameterClass=com.hns.hss.nmf.server.log.manager.gensrc.MSCPerformance.impl.MSCPerfCntrMscMMSTblImpl
insert into
Hello Rahul,
I have gone through the link you gave me here is what is been given there
insert id=InsertOrganization parameterClass=Organization
resultClass=int
selectKey property=Id type=post resultClass=int
SELECT cast(last_value as int) AS value
Hello Rahul,
Well I could not understand what you actually mean to say by this
This works only, if there are no depedencies to the child table and if you
don't have to log the changes
This refers to the use of DELETE during the UPDATE only. If there is a
third table with
FOREIGN KEY
Well I do have sequences defined for my each table which acts as a
primary key for my table now I want to use this generatedkey as a
foreign key in another table so now if I use my class attribute to have
this sequence id , then how can I get that key in java code , I am
assuming I can do in
This is the first time I used Ibatis in a project and I'm stucked on
this error. Exhausted Resultset.
My problem started when i designed my model class like the following:
class MyObject {
private String id;
private String parentId;
private String rootId;
private MyObject root;
Hello Sean,
sorry for answering late. I was too busy today.
Do you mean that Ibatis cannot handle Circular dependencies? If that's
the case then its not possible to call a single recursive statement from
a sqlmap?
I'm not an expert for your case, because I'm not using the select
attribute.
works fine inside java classes, but return the follow error when I run
it inside a JSP page :
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
SelUsers in this SqlMap
SelUsers
^
A typo somewhere in your DAOs?
I prefere to change the order of the operands, because then is no need
to use CDATA sections or XML entities.
AND EXPECTED_DAY = ACTUAL_DAYS
Kengkaj Sathianpantarit schrieb:
Don't forget that you are using XML, use CDATA as follows.
![CDATA[ = ]]
Kengkaj
On Mon, Mar 16, 2009 at 7:38 AM,
Kengkaj
On Mon, Mar 16, 2009 at 3:56 PM, Ingmar Lötzsch
iloetz...@asci-systemhaus.de mailto:iloetz...@asci-systemhaus.de wrote:
I prefere to change the order of the operands, because then is no
need to use CDATA sections or XML entities.
AND EXPECTED_DAY = ACTUAL_DAYS
Kengkaj
I have a class
public class Part{
private Integer id;
private String name;
private Bar bar;
getters/setters
}
I have a mapping for part and for there part I am adding aliases for column
names after join.
I am sure it is not correct way to do it. Please advice how to do
So only way is to do with aliases?
No way I can reuse the already mapped dto other then remap it?
You can use the select attribute instead of resultMap. You can combine
this with lazy loading.
Ingmar
...and there is a problem with resultMap:
You should explane the problem. What exceptions? What table structures?
something like that doesn't work:
resultMap id=addr-result class=Address
result property=addressId column=.. /
result property=street column=.. /
/resultMap
resultMap
Do I have to use TypeHandler? But how?
You don't need a custom TypeHandler. But perhaps you have to provide
more information.
What are the column names of the tables companies and adresses?
Your first message shows that they are different from the class properties.
Which packages contain the
I get exception:
--- Check the company.company-result.
--- The error happened while setting a property on the result object.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: Error instantiating
collection property for mapping 'address'. Cause:
java.lang.ClassCastException:
The
This is a fundamental java issue. You will never be able to cast a list
to a set because a list allows duplicates whereas a set dose not.
The duplicates are not the reason. ArrayList is not a subtype of Set.
And how does the query
select * from Products
produce duplicates?
Lists accept
Hello,
I need to update an array of integers in Postgres with Ibatis 2.3.4 (and
Spring). I want to execute the following query:
UPDATE data SET='{1,2}' WHERE dataid=10
I prefer the use of java.sql.Array and a custom TypeHandler.
The query is
update id=updateQuery
I'm trying to populate a pojo with two array lists and my code doesn't do
what I intended
The pojo has two arrayLists as memebers one called 'dates' the other
'values'
Why can't you create
class DateValuePair
{
private Date date;
private Double value;
... getter,
You can use a type handler and implement java.sql.Array. Example:
1st: abstract superclass as adapter
public abstract class SqlArrayAdapter
implements Array
{
public Object getArray() throws SQLException
{
// Auto-generated method stub
return null;
, Informix, MS-SQL, MySQL,
Oracle, PostgreSQL, Sybase]
Ingmar Lötzsch wrote:
You can use a type handler and implement java.sql.Array. Example:
1st: abstract superclass as adapter
public abstract class SqlArrayAdapter
implements Array
{
public Object getArray() throws SQLException
-InlineParameterMap.
--- Check the parameter mapping for the 'kmsgroupactive' property.
--- Cause: java.lang.NullPointerException
Ingmar Lötzsch wrote:
INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]
INFO does not mean there was thrown an exception.
What
If || is the operator for string concatenation, try
like '$pattern$' || '%'
respectively
like '%' || '$pattern$' || '%'
gonas schrieb:
Hello ,
I am using Ibatis 2.3.Issue Persist as Below mentioned.
Query in Respective Configuration XML As:
select id=getSerialNumber
the
recommended tests.
jishnu123 schrieb:
Dear Ingmar Lötzsch,
Still, I am facing the problem for inserting array field
through iBatis..
Current error list as follows...
Errors List in insert groups::SqlMapClient operation;
uncategorized SQLException for SQL
Sorry, I have maked a mistake:
Your version of IntArrayTypeMapper expects a CollectionInteger but
actual parameter is of type org.ada.kms.domain.IntArray because you let
iBATIS call getKmsgrpaccessiblegroup():
#kmsgrpaccessiblegroups,handler=KmsArrayTypeMapper#
must be
I prefer the use of java.sql.Array and a custom TypeHandler and to keep the sql
as simple as possible.
Here is an example for Ibatis 2.
Create an IntArrayTypeHandler class and register it in the config.
public class IntArrayTypeHandler
implements TypeHandlerCallback
{
public void
39 matches
Mail list logo