Questions tagged [hibernate-5.x]

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

For more details on Hibernate version 5.x view Hibernate ORM Roadmap

368 questions
2
votes
1 answer

MapKeyEnumerated to String

@ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "entity_identifier") @MapKeyEnumerated(EnumType.STRING) @MapKey(name = "type") @Column(name = "identifier") val identifiers: MutableMap =…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
2
votes
0 answers

JoinColumn with multi column concatenated reference. A Foreign key refering * from * has the wrong number of column

Sorry for the awkward title, There isn't an easy way to summarize my problem. I have 2 related entities: the real data has been modified to protect sensitive IP, but the problem is the same. so try not to be distracted by the fields not making…
coderatchet
  • 8,120
  • 17
  • 69
  • 125
2
votes
0 answers

Hibernate mapping on multiple databases (Oracle, Mysql)

I want my web application to run on mysql and Oracle, I use Hibernate 5. My hibernate mapping is as follows: public class EventEntity { @Id @GeneratedValue(generator = "id_generator_EventEntity") @GenericGenerator(name =…
Viktor
  • 1,325
  • 2
  • 19
  • 41
2
votes
0 answers

How to get Count in Hibernate 5 CriteriaBuilder with criteria condition

When I checked below code I got the count of all record. not condition wise. CriteriaBuilder builder = getCurrentSession().getCriteriaBuilder(); CriteriaQuery countQuery = builder.createQuery(Long.class); …
Himanshu
  • 378
  • 8
  • 27
2
votes
0 answers

What kind of auto incremant the "In-Memory" H2 database use?

My Spring Boot 2 / Hibernate 5 application is running some integration tests against the H2 server version 1.4.197. What kind of auto increment is the database server using ? a table keeping a number, global to all tables an 'hibernate_sequence'…
Stephane
  • 11,836
  • 25
  • 112
  • 175
2
votes
1 answer

Spring Boot 2.0.0 Migration - JPA Repository save issue

I just migrated my app from Spring Boot 1.3.3 to 2.0.0.RELEASE and did most of the changes to get my project up and running. However, I am facing an issue when I call ANY repository's save() option. The same structures and DO's were working…
2
votes
1 answer

Integrator not properly loading in Hibernate 5.x

I'm working with Hibernate 5 in a web project, and I need to listen to some database events such as updates and deletes. I'm trying to use the event structure from Hibernate, and I need to use an Integrator to add my listeners. The problem is, the…
Lincoln Alves
  • 546
  • 5
  • 13
2
votes
0 answers

Grails3, Hibernate5 - Proxy parent objects can't resolve child accessors?

I recently upgraded my grails 3.2.10 application to hibernate5 (GORM 6.1.8) from hibernate 4 (GORM 6.1.3). With this upgrade I've started to see some strange (incorrect?) behavior from Proxy objects, I'm wondering if I'm doing something wrong. …
Trebla
  • 1,164
  • 1
  • 13
  • 28
2
votes
2 answers

Hibernate 5 Javassist ClassCastException: cannot be cast to javassist.util.proxy.Proxy

I am getting below error when I use lazy loading in hibernate annotation: @ManyToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL) I am using Hibernate 5.0.11.Release using Spring Boot 1.4.7.Release. …
Mahesh Vemula
  • 145
  • 2
  • 14
2
votes
2 answers

Cannot connect to Informix using Hibernate

I'm trying to connect to Informix database using Hibernate 5.2.10, but the program doesn't respond and gets stuck without throwing any error message. I can't find anything from the console . Any suggest on what mistake I made? I'm new to Hibernate…
Sam
  • 101
  • 3
  • 11
2
votes
0 answers

Hibernate5 with wildfly8 (and jboss-logging)

My Problem: Hibernate-5.0.12-Final uses Jboss-Logging-3.3.1.Final but wildfly8 supplies jboss-logging-3.1.4.GA. Using 3.1.4.GA with Hibernate5 leads to a NoSuchMethodException. I'm deploying a war including Hibernate-5.0.12-Final AND…
cakl
  • 390
  • 1
  • 3
  • 13
2
votes
1 answer

hibernate changes id when saving the object

I've got an object with this parameters { "id" : "36461dd3-2bdb-42de-8e3d-b44e28696b1e", "race" : "HUMAN", "age" : "18", "name" : "Alisa" } I attempt to save it List batch =…
lapots
  • 12,553
  • 32
  • 121
  • 242
2
votes
2 answers

EntityManagerFactory must not be null after migrate to hibernate 5.2.6 in spring boot

I using Hibernate in my Spring boot App after migrate from Hibernate 5.0.11 to 5.2.6.Final .i get EntityManagerFactory must not be null exception this is my codes My Hibernate Configuration @Configuration @EnableTransactionManagement public class…
2
votes
2 answers

Spring Boot 1.4: LocalDateTime mapped to varbinary instead of timestamp type

I am using Java 8, Spring Boot 1.4 and hsqldb. I have an entity with java.time.LocalDateTime field. When I check sql generated by hibernate, it is using varbinary as data type. How do I make it use timestamp data type? Update: It does work when I…
coolscitist
  • 3,317
  • 8
  • 42
  • 59
2
votes
0 answers

error using postgres UUID primary key with Hibernate

I am developing a greenfield web app that uses Spring boot 1.4.1 - which uses spring 4.3.3 & Hibernate 5.2.3.Final under the hood. We are using Postgres 9.4 for our database, so I have the postgres-9.4.1212.jar in my class path as well. All my…
SGB
  • 2,118
  • 6
  • 28
  • 35