Nhibernate 3.0:Mapping in the hbm.xml file for a relational table step by step procedure needed -
i'm using nhibernate version 3.0 , first time im using it.i know how can create hbm.xml file tables relationship exists between them. here scenario have 2 tables named table , table b. table b primary key foriegn key in table a. how need write hbm file , how need insert values both tables simultaneously using 1 object. (ie., how should need write table class file , table b class file.)
if 1 explains me in set step procedure easier me understand.
this covered in nh doc. relationship talking <many-to-one/>
, search here:
http://knol.google.com/k/fabio-maulo/nhibernate-chapter-5-basic-o-r-mapping/1nr4enxv3dpeq/8#
you find examples. in order have intellisense inside visual studio when write hbm files, can copy these files
nhibernate-configuration.xsd nhibernate-mapping.xsd
in c:\programme\microsoft visual studio xxx\xml\schemas
path.
in order save simultaneously referred entity have ensure apply cascade="save-update"
on <many-to-one/>
tag.
Comments
Post a Comment