You need to specify the @Type(type = "uuid-char")
in addition to @Column(name="...", columnDefinition = "uniqueidentifier")
, see also Problems mapping UUID in JPA/hibernate .
Alternatively you can use a String
field for the id in Java and still keep uniqueidentifier
in SQL Server.
More Related Contents:
- How to map an entity field whose name is a reserved word in JPA
- JPA SQL Server No Dialect mapping for JDBC type: -9
- how to configure hibernate config file for sql server
- How do I map a BigDecimal in Hibernate so I get back the same scale I put in?
- Getting Hibernate and SQL Server to play nice with VARCHAR and NVARCHAR
- having an exception when saving oracle type object in some entity
- How can I make a JPA OneToOne relation lazy
- Can someone explain mappedBy in JPA and Hibernate?
- When and why JPA entities should implement the Serializable interface?
- Getting Database connection in pure JPA setup
- How to solve circular reference in json serializer caused by hibernate bidirectional mapping?
- Hibernate and no PK
- annotation to filter results of a @OneToMany association
- No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor
- Hibernate/JPA – annotating bean methods vs fields [duplicate]
- Hibernate, iBatis, Java EE or other Java ORM tool
- What is the ‘best’ way to do distributed transactions across multiple databases using Spring and Hibernate
- What is the use of the @Temporal annotation in Hibernate?
- Hibernate Named Query Order By parameter
- Can’t parse hibernate.cfg.xml while offline
- Is it possible to dynamically define column names in Hibernate / JPA?
- How to add Distinct in Hibernate Criteria
- Getting the Return Value from JDBC MSSQL
- How to rollback a database transaction when testing services with Spring in JUnit?
- Hibernate native query – char(3) column
- Hibernate Error: a different object with the same identifier value was already associated with the session
- How to make a database listener with java?
- How to use DTO in JSF + Spring + Hibernate
- JPA Map mapping
- How to use JTA support in Tomcat 6 for Hibernate?