Hibernate SqlResultSetMapping与空间点MySQL

时间:2019-03-29 00:52:09

标签: mysql hibernate mysql-spatial

我正在尝试使用org.locationtech.jts.geom.Point构造函数结果将SqlResultSetMapping对象返回到POJO中。如果删除Point对象,一切正常,但是有了:

  

在类com.example.data.Local上找不到合适的构造函数

@SqlResultSetMapping(
        name = "PlaceMapping",
        classes = [
            ConstructorResult(
                    targetClass = PlaceResource::class,
                    // need to be in the right order
                    columns = [
                        ColumnResult(name = "id", type = Long::class),
                        ColumnResult(name = "name", type = String::class),
                        ColumnResult(name = "location", type = Point::class),
                        ...
                    ]
            )
        ]
)
@Entity
class PlaceEntity ...

0 个答案:

没有答案