Problem when make transaction with lineString update geometry

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem when make transaction with lineString update geometry

pv2Admin
This post has NOT been accepted by the mailing list yet.
Hello, I have very rare problem. I have one entity with one geometry column. I want to change only one final vertex of the linestring, but Hibernate, when I'm executing the code inside one transactional method, not detect the change of the linestring, and don't update this column.

LineString lineString=(LineString)segment.getGeom();
Coordinate coords []=lineString.getCoordinates();
if (coords instanceof MCoordinate[]){
    coords[coords.length-1]=new MCoordinate(newCoordinate.x,newCoordinate.y);
}else{
    return false;
}

If I reverse the coordinates of geometry, Hibernate make the update.
┬┐How Hibernate knows that the geometry doesn't change?. Where is the method that compares to geometry objects to know if they are equals?

Thanks in advanced:
pv2Admin