Jay Patel Vor 13 Jahren Nice Feature...Thanks Jonas for sharing this Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Steffen Schuler Jay Patel Vor 13 Jahren 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 : ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Steffen Schuler Jonas Yuan Vor 13 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren - Bearbeitet 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Steffen Schuler Jay Patel Vor 13 Jahren 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 : ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Steffen Schuler Jonas Yuan Vor 13 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren - Bearbeitet 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jonas Yuan Steffen Schuler Vor 13 Jahren 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Steffen Schuler Jonas Yuan Vor 13 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren - Bearbeitet 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Steffen Schuler Jonas Yuan Vor 13 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan Steffen Schuler Vor 13 Jahren - Bearbeitet 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jonas Yuan Steffen Schuler Vor 13 Jahren - Bearbeitet 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Hitesh Methani Jonas Yuan Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
sascha hartleb Vor 11 Jahren - Bearbeitet 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jonas Yuan sascha hartleb Vor 11 Jahren Hi Sascha, thanks for your feedback.This feature is not implemented yet. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jonas Yuan sascha hartleb Vor 11 Jahren Hi Sascha, thanks for your feedback.This feature is not implemented yet. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Puj Z Vor 9 Jahren 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ghita Benabdellah Vor 7 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen