Hello.
I have a property mapping:
Map(v => v.Name).CustomTypeIs<TrimmedString>().ColumnName("VNAME");
This doesn't work. CustomTypeIs<TrimmedString>() breaks the chain so
ColumnName is unrecognized:
"FluentNHibernate.Mapping.IProperty" does not contain a definition for
'ColumnName'.
Am I missing a using statement? All I have us: using
FluentNHibernate.Mapping. Full Map is:
public class VendorMap : ClassMap<Vendor>
{
public VendorMap()
{
Id(v => v.Code).GeneratedBy.Assigned().ColumnName
("VNDNR");
Map(v => v.Name).CustomTypeIs<TrimmedString>().ColumnName
("VNAME");
}
}
TrimmedString is IUserType (it just returns the string.trim() of the
result so I don't have a lot of whitespace).
I'm using Fluent NHibernate v2.0.50727. It was the binary download
from r523.
I actually have the same issue for Id(v = v.Code) and CustomTypeIs<>()
but Id won't let CustomTypeIs no matter what -- it isn't an option.
The NHibernate mapping I'm trying to replicate is:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="ConsoleApplication11" namespace="ConsoleApplication11">
<class name="Vendor" table="VENNAM">
<id name="Code" column="VNDNR"
type="ConsoleApplication11.TrimmedString, ConsoleApplication11">
<generator class="assigned" />
</id>
<property name="Name" column="VNAME"
type="ConsoleApplication11.TrimmedString, ConsoleApplication11"/>
</class>
</hibernate-mapping>
This is my first attempt at using FNH so I could be doing something
dumb.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---