Friday, February 10, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: 孙磊
New Today New Today: 1
New Yesterday New Yesterday: 27
User Count Overall: 20591

People Online People Online:
Visitors Visitors: 11
Members Members: 1
Total Total: 12

Online Now Online Now:
01: joe.lo

ClearCanvas Community Forums

Storing to Database
Last Post 2010-06-08 01:06 PM by ikozyol. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ikozyol
Basic Member
Basic Member
Posts:27

--
2010-06-07 09:56 PM  

Hello,

I would like to add my own table to the RIS database, to store and retrieve some custom data.

To do this, I have created a Foo class and a Foo.hbm.xml file, mapping the Foo class to my Foo table.

I have also created:

a) GetFooRequest and GetFooResult classes

b) IFooBroker and FooBroker classes

c) GetFooSearchCriteria class

d) new GetFoo and SetFoo methods in one of the existing service classes

 

My GetFoo method uses the Find method of the IFooBroker class to read from the Foo table. This seems to be working; I can get the client to query Foo rows.

My question is: how do I store a new Foo object to the DB?

Any help or direction would be greatly appreciated.

Thanks,

Igor Kozyol

 

 

 

resnickj
Senior Member
Senior Member
Posts:968

--
2010-06-08 12:27 PM  
Use the IPersistenceContext.Lock method to make the persistence context aware of a new entity. This will cause NHibernate to automatically save it.
Real-time support available to Clinical Edition and Team Edition customers
ikozyol
Basic Member
Basic Member
Posts:27

--
2010-06-08 01:06 PM  
Thanks! I did find this method, and it seems to be saving to DB now.

I really appreciate the help.

Cheers,
Igor


You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.