Joined: Mon Aug 28, 2006 7:29 am Posts: 2 Location: chennai
|
hi
i like to map the value of one table to three table in mysql. if i am using list ie., match Result is mapped to match info but the same value i needed in team info but it is not mapping on that situation. i am getting
org,hibernate.Generic JDBCExeption -cannot execute batch update. so please any one can know the solution for this please forward ur solution. if any misatke i have dont for the exception please forward it as soon as possible.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping >
<class name="MatchResult" table="match_result">
<id name="id" column="id" type="int">
<generator class="increment"/>
</id>
<property name="matchid" type="int"/>
<property name="teamA" column="teamA" type="string"/>
<property name="teamB" column="teamB" type="string"/>
<property name="tossWinner" column="tossWinner" type="string"/>
<property name="tossDecision" column="tossDecision" type="string"/>
<list name="matchInfo" cascade="all">
<key column="parent_id"/>
<index column="idx"/>
<one-to-many class="MatchInfo"/>
</list>
<list name="teamInfo" cascade="all">
<key column="parent_id"/>
<index column="idx"/>
<one-to-many class="TeamInfo"/>
</list>
</class>
<class name="MatchInfo"
table="match_info">
<id name="id" unsaved-value="0">
<generator class="increment"/>
</id>
<property name="matchid" column="matchid" type="int"/>
<property name="teamA" column="teamA" type="string"/>
</class>
<class name="TeamInfo"
table="team_info">
<id name="id" unsaved-value="0">
<generator class="increment"/>
</id>
<property name="teamA" column="teamA" type="string"/>
<property name="teamB" column="teamB" type="string"/>
<property name="tossWinner" column="tossWinner" type="string"/>
<property name="tossDecision" column="tossDecision" type="string"/>
</class>
</hibernate-mapping>
|
|