Questions tagged [ibatis]

iBatis is an object-relational mapping framework for Java. It uses XML descriptors to bridge SQL queries and Java objects. An official port was created for the Microsoft .NET framework.

Apache retired iBatis in June 2010 and it is now developed under the 'MyBatis' name.

Useful links

1073 questions
18
votes
6 answers

How to use an IN clause in iBATIS?

I'm using iBATIS to create select statements. Now I would like to implement the following SQL statement with iBATIS: SELECT * FROM table WHERE col1 IN ('value1', 'value2'); With the following approach, the statement is not prepared correctly and no…
guerda
  • 23,388
  • 27
  • 97
  • 146
18
votes
13 answers

mybatis IllegalArgumentException: Mapped Statements collection does not contain value

i have many problem with spring e mybatis. This is my spring configuration: i have the same configuration and ComuneMapper.java and ComuneMapper.xml stay in the same folders. but i have however this error Somebody to help meeeee
user1671106
  • 193
  • 1
  • 1
  • 9
17
votes
3 answers

MySql.Data.MySqlClient.MySqlException: Timeout expired

In recent times, a particular page in my web app throws the Exception Details: MySql.Data.MySqlClient.MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Though…
Gopi
  • 5,656
  • 22
  • 80
  • 146
16
votes
7 answers

Oracle SQL DATE conversion problem using iBATIS via Java JDBC

I'm currently wrestling with an Oracle SQL DATE conversion problem using iBATIS from Java. Am using the Oracle JDBC thin driver ojdbc14 version 10.2.0.4.0. iBATIS version 2.3.2. Java 1.6.0_10-rc2-b32. The problem revolves around a column of DATE…
RogerV
  • 3,826
  • 4
  • 28
  • 32
14
votes
7 answers

'Source code does not match the bytecode' use IDEA debug JdbcTemplate

When I debug the JdbcTemplate sourcecode use IDEA,the IDE tips me:'Source code does not match the bytecode' Screenshot: and i use mvn to manage my project;my maven pom config is: org.springframework
guruboy
  • 359
  • 2
  • 3
  • 7
14
votes
2 answers

Howto return ids on Inserts with Ibatis ( with RETURNING keyword )

I'm using iBatis/Java and Postgres 8.3. When I do an insert in ibatis i need the id returned. I use the following table for describing my question: CREATE TABLE sometable ( id serial NOT NULL, somefield VARCHAR(10) ); The Sequence sometable_id_seq…
Christoph
  • 794
  • 1
  • 7
  • 19
14
votes
4 answers

Using enum parameters in myBatis dynamic SQL

How to do dynamic SQL in myBatis 3.1.1 based on an enum constant parameter?
Tomer
  • 610
  • 1
  • 7
  • 12
13
votes
1 answer

iBatis Discriminator on Insert

I have an abstract class Example and concrete subclasses to go along with it. I used a discriminator to pull data out of the database, like so:
inanutshellus
  • 9,683
  • 9
  • 53
  • 71
13
votes
5 answers

How to understand Open Source projects/libraries?

There are few open source projects/APIs/libraries that we use in our project (Spring, Struts, iBatis etc.) and I want to understand their design and how they work internally. What is the best way to understand these projects? Note that I am already…
peakit
  • 28,597
  • 27
  • 63
  • 80
12
votes
4 answers

How to get Map as return type using mybatis annotations

Using annotations in mybatis, can we have return type as normal map ? Basically, I want something like this @Select("select a, b from tableA") public Map getItems(); Where mysql> select * from tableA; +------+------+ | a | b …
Mohit Verma
  • 2,019
  • 7
  • 25
  • 33
12
votes
4 answers

mybatis: Using mapper interfaces with XML config for global parameters

I like the XML notation for specifying global parameters such as connection strings. I also like Mapper annotations. When I try to combine the two, I get this exception. Is there a way to combine the two? I would like to use an XML file for the…
ripper234
  • 222,824
  • 274
  • 634
  • 905
12
votes
6 answers

Log SQL queries in project using MyBatis and Spring

In my project i have
Lav
  • 1,283
  • 5
  • 21
  • 48
12
votes
8 answers

Get the id of last inserted record in mybatis

I am newbie to mybatis. I am trying to get the id of last inserted record. My database is mysql and my mapper xml is
Harry
  • 4,705
  • 17
  • 73
  • 101
10
votes
2 answers

How to set fetchSize for iBatis select statement

I'm using iBatis as ORM framework in Java. I have a select statement And I'm using queryForList method: List list =…
nkukhar
  • 1,975
  • 2
  • 18
  • 37
10
votes
2 answers

Preventing SQL Injection In Ibatis

Is there anything built into Ibatis that helps prevent SQL Injection attacks? I'm not looking for a list of ways outside of Ibatis to do this, and am just wondering if Ibatis has anything to prevent SQL Injection.
stevebot
  • 23,275
  • 29
  • 119
  • 181
1
2
3
71 72