Hi,
I'm trying to use the NHibernate.Spatial beta from NhContrib, and it
seems I need an attribute called SRID set on an entity. This is an
example from the tests in the source code:
<class name="Tests.NHibernate.Spatial.Model.County,
Tests.NHibernate.Spatial" table="county">
<id name="Id" type="Int64" column="oid" >
<generator class="native" />
</id>
<property name="Name"/>
<property name="State" />
<property name="Boundaries" column="the_geom">
<type
name="NHibernate.Spatial.Type.GeometryType,NHibernate.Spatial">
<param name="srid">32719</param>
<param name="subtype">POLYGON</param>
</type>
</property>
</class>
This is what I have come up with as the equuivalent in fluent:
public AreaMapping()
{
Id(c => c.Id).GeneratedBy.Native();
Map(c => c.Name).Not.Nullable();
Map(c => c.State).Not.Nullable();
Map(x => x.Boundaries)
.CustomTypeIs<MsSql2008GeometryType>()
.CustomSqlTypeIs("GEOGRAPHY")
.SetAttribute("srid", "4326")
.SetAttribute("subtype", "POLYGON");
}
However I get an exception during runtime:
XML validation error: The 'SRID' attribute is not declared.
Message: The 'SRID' attribute is not declared.
Anyone know what i am missing? Could it be that I need to upgrade my
NHibernate version 2.1.0 to the latest 2.1.2? I am using the MsSql2008
dialect.
Thanks
--
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.