Hi, has anyone managed to get the NHibernate spatial stuff to work with the 
latest version of NHibernate. I managed to rebuild the project targeting 
the correct version of NHibernate after following:
 
http://build-failed.blogspot.co.uk/2012/02/nhibernate-spatial-part-1.html
 
My IGeometry field is mapped correctly as I can both query it and 
insert/update it. However I have tried using one of the LINQ extension 
methods by saying session.Query<Type>().Where(t => 
t.Fiedl1.Distance(t.Field2)).ToList();
 
But this gives the error:
 
"A .NET Framework error occurred during execution of user-defined routine 
or aggregate \"geography\": \r\nSystem.ArgumentException: 24204: The 
spatial reference identifier (SRID) is not valid. The specified SRID must 
match one of the supported SRIDs displayed in the 
sys.spatial_reference_systems catalog view.\r\nSystem.ArgumentException: 
\r\n   at Microsoft.SqlServer.Types.SqlGeography.set_Srid(Int32 
value)\r\n   at Microsoft.SqlServer.Types.SqlGeography.Read(BinaryReader 
r)\r\n   at SqlGeography::.DeserializeValidate(IntPtr , Int32 , 
CClrLobContext* )\r\n."
 
I know I have set the SRID correctly after following the instructions in 
the post above. I have also made sure I have registered the spatial linq to 
hql generators in the session factory.
 
I'd appreciate it if someone could let me know if it is compatible with the 
latest version.
 
Thanks
 
Lee

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to