Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-20 Thread klawry
Markus, Thanks for the sample. I had found the BinaryFormatter myself but couldn't figure out what stream type to use (I didn't find MemoryStream when I was looking). I'll give this a shot. I really appreciate your help. Thanks again. Kevin

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-19 Thread klawry
Markus, Thanks for your reply. I think you're on the right track - I found another post mentioning the use of Byte[] with BinaryBlob. The only problem is that I can't find any documentation anywhere on how to convert an object to System.Byte[]. It sounds like a fairly straightforward thing to

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-19 Thread Markus Zywitza
Take a look at the BinaryFormatter and MemoryStream classes. -Markus 2009/3/19 klawry kla...@visient.com Markus, Thanks for your reply. I think you're on the right track - I found another post mentioning the use of Byte[] with BinaryBlob. The only problem is that I can't find any

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-19 Thread Markus Zywitza
Short sample : using System; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using NUnit.Framework; namespace Serializable { [Serializable] public class MySampleClass { public virtual string Message { get; set; } } public class SampleHolder {

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-18 Thread klawry
Hi Hammett, Thanks for the reply. Is there any way to manually set the property or the instance of the class as not dirty? Aside from that, the only other suggestion I've seen that could work is to open a second NHibernate session that is set to not persist changes. Or maybe I could inherit

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-18 Thread Markus Zywitza
Please see here: http://nhforge.org/doc/nh/en/index.html#mapping-types I'd try to make a backing private property or field of type Byte[] persisted as BinaryBlob. If you don't want that for design reasons, you could define a IUserType for the PortletConfiguration class. Even better would be a

Re: ActiveRecord: Mysterious UPDATEs with Serializable Objects

2009-03-17 Thread hammett
My guess is that NH wont ever know if that object was changed, so it will always consider the root dirty. On Tue, Mar 17, 2009 at 6:56 AM, klawry kla...@visient.com wrote: Here's the problem I'm running into. I'm using MS SQL 2005 and Castle ActiveRecord RC3 with NHibernate 2.0.0.1001. I