Just an observation,
List ancestors;
public virtual IList Ancestors
{
get
{
ancestors = ancestors ?? GetAncestors(this);
return ancestors;
}
}
This kind of properties will always be mapped with the current version
of FNH, because of the im
Forgot to check if property is ReadOnly this code would be more
appropriate:
if (property.CanWrite)
{
if (property.PropertyType.IsEnum)
return true;
return property.PropertyType.Namespace == "System";
}
On 18 mar., 14:42, "gre...@slavec.net" wro
line,
like this:
if (property.PropertyType.IsEnum)
return true;
Is this correct?
On 18 mar., 14:02, "trull...@googlemail.com"
wrote:
> Looks like this answers my post a moment ago
>
> http://groups.google.com/group/fluent-nhibernate/browse_thread/thread...
>
> A
Enums members in entities are skipped when automaping is used.
I found this test in AutoMap tests:
[Test]
public void ShouldAutoMapEnums()
{
Model(model => model
.ForTypesThatDeriveFrom(mapping =>
mapping.Map(x => x.Enum).SetAttrib
hack because it is a
> hack. :) What would make this easier to do is if we had a RemovePart
> () method on the ClasslikeMapBase class, then I wouldn't have to cast
> an IEnumerable to an IList. :)
>
> Patch for said change is
> here:http://jonkruger.com/ClasslikeMapBase.Remove
You can try this:
...
.WithConvention(convention =>
{
convention.ForAttribute
(UnmappableAttribute.RemoveMapping);
})
...
public class UnmappableAttribute : Attribute
{
public static void RemoveMapping(UnmappableAttr
Hi,
Could support for standard Nhibernate enumeration mapping be added to
AutoPersistenceModel?
For example mapping a property Direction of type enum WindDirection {}
would produce following output:
Example implementation would be:
public class Conventions {
...
public void UseSimpl