Hi,
I wrote a custom user type for PostGIS the spatial database here
http://postgis.refractions.net/support/ ... patialEJB3
and am now looking to add custom function to support spatial functions in a PostGIS dialect, but I am getting errors
Caused by: java.lang.IllegalStateException: No data type for node: org.hibernate
.hql.ast.tree.MethodNode
when I try to execute the following
Query test = entityManager.createQuery("Select AsText(p.location) from PersonEntity p");
where location is custom user type Geometry marked, and persists fine to the db.
My dialect looks like this (very simple at the moment), do you have any suggestions.
public class PostGISDialect extends PostgreSQLDialect{
public PostGISDialect()
{
super();
registerFunction("AsText", new StandardSQLFunction("AsText", Hibernate.custom(GeometryType.class)));
}
}
Many thanks,
Norman