Hi All members,
The Scenerio:
**I have two tables, UserAccount and Businees, UserAccount has a forign key businessId from Business, (1 user always has 1 business).
**I have a signup form in which I have to insert data in these both tables.
hbm Mapping doc for UserAccount is here:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Aug 24, 2006 3:14:23 PM by Hibernate Tools 3.1.0.beta5 -->
<hibernate-mapping>
<class name="tyn.cm.hibernate.UserAccount" table="userAccount"
schema="dbo" catalog="YellowNumber">
<id name="userId" type="long">
<column name="userID" />
<generator class="assigned" />
</id>
<property name="businessId" type="string">
<column name="businessID" length="36" />
</property>
<property name="userName" type="string">
<column name="userName" length="36" not-null="true"
unique="true" />
</property>
</class>
</hibernate-mapping>
Issue:
I m new 2 hibernate n I wana know how I will bind my userId with businessId and how I code such method or I be provided by Hibernate tht I can insert data in both tables.
also want to know whn I have the case many-to-many and one-to-many case.
If u have any tutorial for that or u want to help directly, plz do that
Lookig for ur help
rgd