mybatis

    2熱度

    1回答

    我想使用MyBatis從PostGIS數據庫查詢數據,忽略地理空間數據。我下表在數據庫: CREATE TABLE salesgeometry ( id bigint NOT NULL, label character varying(255), type character varying(255), geom geometry, CONSTRA

    2熱度

    1回答

    說我有兩個域對象和一個映射器接口。 class Person { int id; List<Problem> problems = new ArrayList<Problem>(); } class Problem { int id; Person person; } interface PersonMapper { public Li

    2熱度

    1回答

    我使用Spring 3.0.5開發java應用程序,我使用mybatis-spring與數據庫Oracle一起工作。 我已經爲MyBatis的接口: public interface SubscriberMapper { Subscriber getSubscriberByMsisdn(String msisdn); void insertSubscriber(Subscri

    14熱度

    2回答

    我想使用HSQL內存數據庫對MyBatis持久層進行單元測試。真正的應用程序使用Oracle數據庫。這工作得很好,我們開始爲id列添加自動遞增的數字。 Oracle需要使用序列來獲取增加的數字,以便在Oracle數據庫中創建一個名爲basis_seq的序列。在我的MyBatis映射器XML文件,我有這樣的: <insert id="insertBasis" parameterType="com.f

    3熱度

    1回答

    使用最新版本的mybatis。有一個映射器和DAO。做批量插入。它的工作,但我想知道有多少行插入。在JDBC中,我可以將更新計數作爲一個int數組。我怎樣才能在mybatis/ibatis中得到這個? Mapper.. @Insert(NEW_ORDER) int create(final OrderBatch order); // represents one row to insert

    0熱度

    1回答

    我有以下情況。 這是我的MyBatis的SQL語句: <select id="select" parameterType="String" resultMap="urlList"> select x.t002_id from t002_metadata x where existsNode(x.t002_xml, ?) =

    2熱度

    1回答

    是否有可能在myBatis 3中將單個結果映射到多個對象,確保所有對象都引用相同的實例?有沒有我可以參考的例子? 更新添加更多詳細信息: 舉例來說,假設我將關於Contact爲了我在我的數據庫應用程序的信息。我想知道是否有可能使用的MyBatis映射一個接觸的同一個實例,比方說,一個Listing類,它擁有Contact: public class Listing { private C

    1熱度

    1回答

    我被堆疊。我想替換直接使用sql來支持mybatis faramework。 我想選擇具有填充屬性圖的帳戶列表。 但是讓我們從一開始,第一個Account類 public class Account { private int id; ... private Map<String, String> properties; ... //setters

    3熱度

    1回答

    我正在試圖在Spring環境中使用Spring 3.0.5.RELEASE以及MyBatis。我添加了mybatis-spring依賴項。事實證明,由於MalformedParameterizedTypeException(下面包含詳細的堆棧跟蹤)而不起作用。 堆棧跟蹤: SEVERE: Exception sending context initialized event to listener

    2熱度

    1回答

    有人知道與EJB3和MyBatis的其中容器控制事務,的代碼我創立了僅一部分的例子是: SQLMapConfig.xml <transactionManager type="EXTERNAL"> <property name="SetAutoCommitAllowed" value="false"/> <dataSource type="JNDI"> <proper