Jay Patel 13 年之前 Nice Feature...Thanks Jonas for sharing this 请登录以投票。 以……回复 取消 Steffen Schuler Jay Patel 13 年之前 Is this theory or does this approach work? with PostGIS, there are other datatypes, I'am very interested in - Geometry, Polygon, Point... these Datatypes are accessible through HibernateSpatial extension. With your proposal, I should be able to integrate them with ServiceBuilder - but before I try it, I would like to know, if your suggestion works like described : ) 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 Hi Steffen, Thanks. This is a new feature for LR 6.1. :-)You are right that date types Geometry, Polygon, Point would be very useful, specially for postGIS. It is possible that these data types could be added as well in Service-Builder. Well, Liferay will go postGIS. right?Do you have detailed requirements? 请登录以投票。 以……回复 取消 Steffen Schuler Jonas Yuan 13 年之前 PostGIS provides very stable and powerful geospatial functions. I managed to use PostGIS through JPA 2.0 (with the help of a session customizer) JPA 2.0 provides a nice QueryAPI, allowing you to call the geospatial functions e.g. ... List<POI> pois = eventJPAC.getEntityManager() .createNamedQuery("POI.findByDistanceInMeters") .setParameter(1, "Point(10.3548617 50.9681888)") .setParameter(2, 5000) .getResultList();... @Entity@NamedNativeQueries({ @NamedNativeQuery(name = "POI.findByDistanceInMeters", query = "select * from poi where ST_Distance_Sphere(" + " ST_Centroid(event.location), ST_GeomFromText(?1, 4326))" + " < ?2 order by poi.date", resultClass=POI.class)})public class POI implements Serializable { ... }As you can see, there are methods like ST_Distance_Sphere and ST_Centroid called, which are provided by PostGIS. Accessing these functions are crucial.Somehow, it seems to be a similar issue when accessing MongoDB from within a service - you need to customize a lot - at least replace the DAO of the recommended code. I mention MongoDB because it provides simple geospatial queries, too... and of course MySQL is somewhere in between PostGIS and MongoDB, when it comes to GIS data processing.Maybe we need a kind of plugin mechanism for extending the service builder : )... according to your post, I just build the 6.1 version myself and therefore, your approach should work. Is there a complete code example available?Regards, Steffen 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 - 编辑过的 Thanks, Steffen. This is useful info. By the way, how to present data types Geometry, Polygon, Point in database? should these data types be mapped into BLOCK - database type? 请登录以投票。 以……回复 取消 Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
Steffen Schuler Jay Patel 13 年之前 Is this theory or does this approach work? with PostGIS, there are other datatypes, I'am very interested in - Geometry, Polygon, Point... these Datatypes are accessible through HibernateSpatial extension. With your proposal, I should be able to integrate them with ServiceBuilder - but before I try it, I would like to know, if your suggestion works like described : ) 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 Hi Steffen, Thanks. This is a new feature for LR 6.1. :-)You are right that date types Geometry, Polygon, Point would be very useful, specially for postGIS. It is possible that these data types could be added as well in Service-Builder. Well, Liferay will go postGIS. right?Do you have detailed requirements? 请登录以投票。 以……回复 取消 Steffen Schuler Jonas Yuan 13 年之前 PostGIS provides very stable and powerful geospatial functions. I managed to use PostGIS through JPA 2.0 (with the help of a session customizer) JPA 2.0 provides a nice QueryAPI, allowing you to call the geospatial functions e.g. ... List<POI> pois = eventJPAC.getEntityManager() .createNamedQuery("POI.findByDistanceInMeters") .setParameter(1, "Point(10.3548617 50.9681888)") .setParameter(2, 5000) .getResultList();... @Entity@NamedNativeQueries({ @NamedNativeQuery(name = "POI.findByDistanceInMeters", query = "select * from poi where ST_Distance_Sphere(" + " ST_Centroid(event.location), ST_GeomFromText(?1, 4326))" + " < ?2 order by poi.date", resultClass=POI.class)})public class POI implements Serializable { ... }As you can see, there are methods like ST_Distance_Sphere and ST_Centroid called, which are provided by PostGIS. Accessing these functions are crucial.Somehow, it seems to be a similar issue when accessing MongoDB from within a service - you need to customize a lot - at least replace the DAO of the recommended code. I mention MongoDB because it provides simple geospatial queries, too... and of course MySQL is somewhere in between PostGIS and MongoDB, when it comes to GIS data processing.Maybe we need a kind of plugin mechanism for extending the service builder : )... according to your post, I just build the 6.1 version myself and therefore, your approach should work. Is there a complete code example available?Regards, Steffen 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 - 编辑过的 Thanks, Steffen. This is useful info. By the way, how to present data types Geometry, Polygon, Point in database? should these data types be mapped into BLOCK - database type? 请登录以投票。 以……回复 取消 Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
Jonas Yuan Steffen Schuler 13 年之前 Hi Steffen, Thanks. This is a new feature for LR 6.1. :-)You are right that date types Geometry, Polygon, Point would be very useful, specially for postGIS. It is possible that these data types could be added as well in Service-Builder. Well, Liferay will go postGIS. right?Do you have detailed requirements? 请登录以投票。 以……回复 取消 Steffen Schuler Jonas Yuan 13 年之前 PostGIS provides very stable and powerful geospatial functions. I managed to use PostGIS through JPA 2.0 (with the help of a session customizer) JPA 2.0 provides a nice QueryAPI, allowing you to call the geospatial functions e.g. ... List<POI> pois = eventJPAC.getEntityManager() .createNamedQuery("POI.findByDistanceInMeters") .setParameter(1, "Point(10.3548617 50.9681888)") .setParameter(2, 5000) .getResultList();... @Entity@NamedNativeQueries({ @NamedNativeQuery(name = "POI.findByDistanceInMeters", query = "select * from poi where ST_Distance_Sphere(" + " ST_Centroid(event.location), ST_GeomFromText(?1, 4326))" + " < ?2 order by poi.date", resultClass=POI.class)})public class POI implements Serializable { ... }As you can see, there are methods like ST_Distance_Sphere and ST_Centroid called, which are provided by PostGIS. Accessing these functions are crucial.Somehow, it seems to be a similar issue when accessing MongoDB from within a service - you need to customize a lot - at least replace the DAO of the recommended code. I mention MongoDB because it provides simple geospatial queries, too... and of course MySQL is somewhere in between PostGIS and MongoDB, when it comes to GIS data processing.Maybe we need a kind of plugin mechanism for extending the service builder : )... according to your post, I just build the 6.1 version myself and therefore, your approach should work. Is there a complete code example available?Regards, Steffen 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 - 编辑过的 Thanks, Steffen. This is useful info. By the way, how to present data types Geometry, Polygon, Point in database? should these data types be mapped into BLOCK - database type? 请登录以投票。 以……回复 取消 Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
Steffen Schuler Jonas Yuan 13 年之前 PostGIS provides very stable and powerful geospatial functions. I managed to use PostGIS through JPA 2.0 (with the help of a session customizer) JPA 2.0 provides a nice QueryAPI, allowing you to call the geospatial functions e.g. ... List<POI> pois = eventJPAC.getEntityManager() .createNamedQuery("POI.findByDistanceInMeters") .setParameter(1, "Point(10.3548617 50.9681888)") .setParameter(2, 5000) .getResultList();... @Entity@NamedNativeQueries({ @NamedNativeQuery(name = "POI.findByDistanceInMeters", query = "select * from poi where ST_Distance_Sphere(" + " ST_Centroid(event.location), ST_GeomFromText(?1, 4326))" + " < ?2 order by poi.date", resultClass=POI.class)})public class POI implements Serializable { ... }As you can see, there are methods like ST_Distance_Sphere and ST_Centroid called, which are provided by PostGIS. Accessing these functions are crucial.Somehow, it seems to be a similar issue when accessing MongoDB from within a service - you need to customize a lot - at least replace the DAO of the recommended code. I mention MongoDB because it provides simple geospatial queries, too... and of course MySQL is somewhere in between PostGIS and MongoDB, when it comes to GIS data processing.Maybe we need a kind of plugin mechanism for extending the service builder : )... according to your post, I just build the 6.1 version myself and therefore, your approach should work. Is there a complete code example available?Regards, Steffen 请登录以投票。 以……回复 取消 Jonas Yuan Steffen Schuler 13 年之前 - 编辑过的 Thanks, Steffen. This is useful info. By the way, how to present data types Geometry, Polygon, Point in database? should these data types be mapped into BLOCK - database type? 请登录以投票。 以……回复 取消 Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
Jonas Yuan Steffen Schuler 13 年之前 - 编辑过的 Thanks, Steffen. This is useful info. By the way, how to present data types Geometry, Polygon, Point in database? should these data types be mapped into BLOCK - database type? 请登录以投票。 以……回复 取消 Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
Hitesh Methani Jonas Yuan 12 年之前 Thanks Jonas,Looking forward to use this feature, as we too are handling currency fields manually which is tedious, bigdecimal type would help a lot.Regards,Hitesh Methani 请登录以投票。 以……回复 取消
sascha hartleb 11 年之前 - 编辑过的 There are some confusing sentences in this post:"...Service-builder supports following Java data types and database data types mapping.[...] TEXT (>4000)..."The basic service builder never has or had support for the type TEXT. You mention that in the sentence after that, but why do you list TEXT(>4000)?..."Add a data type called BigDecimal in service-builder DTD"Where? There is no list of datatypes in the service-builder_x_x_x.dtd.Where do I have to map the BigDecimal-object to sql and back?Also BigDecimal should be a build-in datatype of liferay (as I see the request exists for at least 15 months). It's essential for financial calculations. 请登录以投票。 以……回复 取消 Jonas Yuan sascha hartleb 11 年之前 Hi Sascha, thanks for your feedback.This feature is not implemented yet. 请登录以投票。 以……回复 取消
Jonas Yuan sascha hartleb 11 年之前 Hi Sascha, thanks for your feedback.This feature is not implemented yet. 请登录以投票。 以……回复 取消
Puj Z 9 年之前 Hey,I am using 6.2 and in the dtd there are no signs of constraint-precision or constraint-scale for "column". Wasn't this feature supposed to be implemented for 6.1? Have I missed anything? Is there another approach now for having decimal type for columns? 请登录以投票。 以……回复 取消
Ghita Benabdellah 7 年之前 Hi JONAS,I need to add values of double with null values.I'm using liferay 6.2 ga6 & I've tried your solution but it didn't work.I've also tried following the steps that you defined in this post : https://web.liferay.com/fr/community/forums/-/message_boards/message/6811878but when I copied the patch lps9022-servicebuilder-ce6050-portal-impl-jdk5.jar in $TOMCAT_WEBAPPS/ROOT/WEB-INF/lib folder and tried to rebuild services, it just got stuck upon deleting jar and nothing after that happened.Is this patch supported in liferay 6.2 ? Thank you for your reply 请登录以投票。 以……回复 取消