setting id's manually on objects

29 views
Skip to first unread message

Sean Farrow

unread,
Jan 29, 2013, 8:42:50 AM1/29/13
to sharp-arc...@googlegroups.com

Hi Fokes:

I’m in the process of storing some data that is coming in from an xml feed.

Due to the fact that multiple editions of the feed will be released over time, I need to set id’s on objects (id’s are the primary keys as per convension). If I set an id on an object and then call SaveOrUpdate will sharp try and reset the id.

Is this best practice—infact should I be deriving from entity at all?

Any help appreciated.

Regards

Sean..

Stephen Hardie

unread,
Jan 29, 2013, 4:43:36 PM1/29/13
to sharp-arc...@googlegroups.com
I don't believe this is managed by SA at all (someone correct me if I'm wrong) but rather by nhibernate itself.  

Check out this similar post on Stackoverflow...

Sean Farrow

unread,
Jan 29, 2013, 5:33:55 PM1/29/13
to sharp-arc...@googlegroups.com

Hi:

Thanks, just what I was looking for!

Cheers

Sean.

--
You received this message because you are subscribed to the Google Groups "S#arp Architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharp-architect...@googlegroups.com.
To post to this group, send email to sharp-arc...@googlegroups.com.
Visit this group at http://groups.google.com/group/sharp-architecture?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages