1

I have an Entity which has a field named coordinates of type org.postgresql.geometric.PGpath :

public class Geometry
{
 ...

    @Column
    @NotNull
    private PGpath coordinates;

I am trying to build a JSONObject with some of these entities but I am getting the message:

could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize

1 Answer 1

1
@ManyToOne
@JoinColumn(name = "Whatever your join column name is in your PGpath class")
private PGpath coordinates;

PGpath will also be an @Entity class with its own columns and column constraints, such as:

@Id
@Column(name = "Column name", nullable = false, length = 10)
private String myPrimaryKey;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.