For the Caveat Emptor project in the Hibernate In Action book, I decided to go bleeding edge and use NH 2.1.0 Alpha 2 with ASP.NET 3.5 SP1. Thus there were several straightforward adjustments that I had to make to converge towards a clean build.
However, the build is almost there but not quite clean yet. What remain are the errors in certain mapping
.NET class attributes (Lazy and Cascade) that are listed below.
These settings all fail in the build because an implicit type conversion not possible. The "true" for Lazy cannot be converted to NHibernate.Mapping.Attributes.CollectionLazy, and the various Cascade settings cannot be converted to string.
Why? How should these .NET class attribute settings be equivalently coded for the NH 2.0+? I did not see any indication of this being broken going to 2.0+.
Thanks for any help,
Dwight Spencer (toketeeman)
Portland, Oregon
Code:
[Set(... , Cascade = CascadeStyle.AllDeleteOrphan, ...)]
[Set(... , Cascade = CascadeStyle.All, ...)]
[Set(... , Cascade = CascadeStyle.None, ...)]
[Set(... , Lazy = true, ...)]