[fluent-nhib] Re: PersistenceSpecification vs. Lazy Loading

2009-01-16 Thread James Gregory
You shouldn't need to do a custom Equals method, you should just be able to override standard Equals. The proxy would be a subclass of your entity class, so you shouldn't have any trouble with that; overriding Equals and GetHashCode is generally the solution for this kind of issue. On Thu, Jan

[fluent-nhib] Re: PersistenceSpecification vs. Lazy Loading

2009-01-16 Thread brendanjerwin
At first I was determined to exclude ANY changes to my domain for the sake of the ORM, so that was the reason for wanting the change to be localized in the test framework. Of course, after your answer I realized that 1) I've already made changes for the ORM (virtual), and 2) Equals will behave

[fluent-nhib] Re: PersistenceSpecification vs. Lazy Loading

2009-01-15 Thread Brendan Erwin
Ok, I have a possible solution to this. (Has this not bitten anyone else?) I wrote a DuckEquals method that behaves a lot like Equals except it uses reflection to do the comparison based on property name, type, and value. Basically, if the right hand side has at least the same properties