Subscribe to Subscribers

Forums » .NET » .NET »

Nhibernate


Posted Date: 18 Nov 2009      Posted By:: radhi     Member Level: Bronze    Member Rank: 0     Points: 1   Responses: 1



Rabiya,

Could you please guide me, I have database diagram like Visit, appointment, patient, provider, person.

Visit table have relations with appointment ,patient ,provider and person.

I have visit.hbm.xml and visit.cs like all table . Created table with relation using generate schema.

I want to save visit . but it should save all the relevant table also.

How it is possible.? using multilevel hierachy Nhibernate??




Responses

#444104    Author: Spidy      Member Level: Gold      Member Rank: 301     Date: 18/Nov/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi Radhi,
You could've replied to that thread itself right. Now i saw ur post.
There is nothing to do in your mappings ie hbm.xml or .cs.

.In your dotnet code add visitId primary key of Visit table to appointment ,patient ,provider and person tables.

.Add this id in .hbm.xml and .cs files of appointment ,patient ,provider and person tables.

.While saving appointment ,patient ,provider and person tables first retrieve the visitId from Visit table and save it in these table.

.While Retriving info from appointment ,patient ,provider and person tables pass visitId as a parameter to the GetFunctions of these tables.

Hope from this you can get some idea.

-


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Infragistics
Previous : Referencing DLL
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.