Hi,
I'm finding that even though I have code wrapped by Spring transactions, and it commits/rolls back when I would expect, in order to make use of JDBC batching when using Ibatis and Spring I need to use explicit SqlMapClient transaction methods.
I.e. this does batching as I'd expect:
dao.getSqlMapClient().startTransaction();
dao.ge...
Hello
I am using ibatis and C#. i get a result from a select query that has CreatedDate as one of the field. The Datatype of CreatedDate in Mysql is Date. I assign the result set of the select query to a Ilist< DeliveryClass>.
Here the DeliveryClass CreatedDate as DateTime. When i run the application, i get Unable to convert MySQL da...
I have an extremely odd problem in my JUnit tests that I just can't seem to nail down. I have a multi-module java webapp project with a fairly standard structure (DAO's, service clasess, etc...). Within this project I have a 'core' project which contains some abstracted setup code which inserts a test user along with the necessary item...
I have a database that is similar to the following:
create table Store(storeId)
create table Staff(storeId_fk, staff_id, staffName)
create table Item(storeId_fk, itme_id, itemName)
The Store table is large.
And I have create the following java bean
public class Store
{
List<Staff> myStaff
List<Item> myItem
....
}
public...
I am getting the following error:
java.sql.SQLException: Closed
Connection at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at
...
How to turn on logging queries in GWT hosted mode?
...
I've been trying to select a list of values from XMLs stored in an
XMLType column but I keep getting the errors which are listed at the
tail end of this post.
The select id is
getXMLFragment
, and the relevant subset of the
sqlmap.xml is as follows:
<select id="getXMLFragment" resultClass="list">
SELECT
...
According to the user guide i am able to use file path instead of
resource:
// Using classpath relative resources
<mappers>
<mapper resource="org/mybatis/builder/AuthorMapper.xml"/>
</mappers>
// Using url fully qualified paths
<mappers>
<mapper url="file:///var/sqlmaps/AuthorMapper.xml"/>
</mappers>
in my project I'm try...
Is there an Ibatis setting to view the generated SQL like how Hibernate has show_sql=true?
thanks
...
I am trying to do webservice (I am quite new in Webservice under java). I am using netbeans.
Axis2 is having problem trying to locate the the xml configuration file for mybatis
Anyone can tell me how to successfully deploy mybatis configuration. Should I manually copy the configuration under .netbeans\6.8\apache-tomcat-6.0.20_base\web...
I am specifically interested in moving away from XML-based mapper configuration to using pure Java annotations where the SQL statements often take or return complex data structures.
Also, it wasn't clear in the samples I saw, how the configuration file was adapted when moving away from XML-based mappers to annotation-based Mapper interf...
We use Spring + iBatis in all of our DAO's to fetch data from Stored Procedures.
There are two main JNDI connections. one going to the datawarehouse and another going to livedb.
recently lot of SPs have been moved from the livedb to the datawarehouse and vice versa.
This is creating issues on the java side because:
Now, each DAO d...
I am trying to pass null to a parameter map but I keep getting error saying:
--- Check the parameter mapping for the 'something' property.
How I cam calling code:
HashMap myMap = new HashMap ()
myMap.put("something", null)
getSqlMapClientTemplate().queryForList("list_of_sps.getByLastNameExactMatch", myMap );
My Mappings:
<proc...
Hi Everyone!
Decided to move one of my project from iBatis to MyBatis and ran into a problem with insert.
mapper xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="bap.persistance.interfaces....
Hi,
How can I define some properties dynamically in Java. For now, I'm using a properties file, but I need to change these properties before installation, so these properties should be set in a file outside the jar (or install) file.
These properties define my IBatis connection.
Thansk in advance,
Victor
...
I have a table called "users" with following columns
userid,name,gender,department,managerid....
I wanted to do this query but was having 2 issues
1. <> in line 4 is is causing problem, which is due to to the XML. I need to use but was not able to get things going even after some permutations.
2. the check department = 'engineering' ...
I'm trying to setup iBatis to use boneCP for my JDBC. I haven't tried changing my code yet I'm just curious how I would need to go about doing it.
I haven't seen any good guides on how to setup iBatis with an external JDBC.
From what I have figured out:
The sqlConfig xml needs to be changed. The transactionManager type needs to be chan...
I have a table mgr_employee with 2 columns managerName, teamEmployee.Although I do a sort in sql I get unsorted resultMap in java. How can I get a sorted map? Why does iBatis mix up the resultMap?
<resultMap id="s_filter_defaults_ResultMap" class="java.util.HashMap">
<result property="key" column="managerName"/>
<result property="v...
Hello All,
Is it possible to pass dynamic query to Ibatis and get the record from it?
E.g. I built my query using StringBuilder and at last, I got the following query "select emp_id, emp_name from employee where emp_id==1" . Now i need to pass this complete query to Ibatis and get the record.
Note: Here the number of columns and wher...
I’m using iBatis with lazy-loading. I have a result map of a Person class and it has a result property, Friend, which selects another table.
The problem I’m having is that, somewhere in the code I’m checking for:
if(user.getFriend() == null) { //do something}
But that condition is always false, even though a user which I got back has n...