We're updating the issue view to help you get more done. 

Too much memory consumption hibernate spatial

Description

District.java

1 2 3 4 5 6 7 8 9 10 11 12 @Id @Basic(optional = false) @Column(name = "ID", precision = 10, scale = 0, nullable = false) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "quarterSeq") private Long id; @Column(name = "LOCATION", nullable = true) @Basic(fetch = FetchType.LAZY) @Type(type = "org.hibernate.spatial.GeometryType") private Geometry location; ....

With definition entity with above, every select in hibernate initializes location field even it is a lazy field. Otherwise when hibernate creates an geometry object , number of vertex in geometry data of MCoordinate Object will be created in memory. So this makes memory leaks on server.

To avoid this problem, we tried to use geometry field with lazy fetch type annotations but it did not effect anything, it is still loading geometry data even if not desired.

No I am trying to remove location fields from my entities and only use center of location informations for reducing memory usage.

Is this a bug or somewhat.

Thanks in advance.

Environment

4.1.0.Final Hibernate Version Oracle 11g

Status

Assignee

Karel Maesen

Reporter

Şaban DEMİRCİ

Components

Affects versions

4.0.1

Priority

Major