by end of this month whole code going to release.any way i m giving
you the part my code that has problem.
These are the two table system_master and soft_detail and it has one-
to-many relationship.
Current database: snmp
system_master
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| ipAddress | varchar(20) | NO | PRI | NULL | |
| sysName | varchar(45) | YES | | NULL | |
| ramCapacity | varchar(20) | YES | | NULL | |
| hddCapacity | varchar(20) | YES | | NULL | |
| osRunning | varchar(25) | YES | | NULL | |
| sysMac | varchar(200) | YES | | NULL | |
| lastUpdate | varchar(45) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
soft_detail
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| ipAddress | varchar(20) | YES | MUL | NULL | |
| softName | varchar(250) | YES | | NULL | |
| lastUpdate | varchar(45) | NO | | NULL | |
+------------+--------------+------+-----+---------+-------+
and my mapping file is like this
[code map]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
"
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.s7.admintools.dao.Hardware" table="system_master">
<id name="ipAddress" column="ipAddress" type="java.lang.String">
</id>
<property name="sysName" column="sysName" />
<property name="ramCapacity" column="ramCapacity" />
<property name="hddCapacity" column="hddCapacity" />
<property name="osRunning" column="osRunning" />
<property name="sysMac" column="sysMac" />
<property name="lastUpdate" column="lastUpdate" />
</class>
<class name="com.s7.admintools.dao.Software" table="soft_detail">
<id name="ipAddress" column="ipAddress" type="java.lang.String">
</id>
<!-- <property name="ipAddress" column="ipAddress"/> -->
<property name="softName" column="softName"/>
<property name="lastUpdate" column="lastUpdate" />
</class>
</hibernate-mapping>
[/code map]
this code working but in two different commit, i mean that i making
two open transactions and commit. but i thinking we can do this within
one commit.
Thanks
VM