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
0
votes
0 answers

Are Hibernate's named queries perform better in comparison with the regular ones?

Is there any performance benefit of using named Hibernate queries over the regular ones? E.g., would the (1) be preferable to the (2) in terms of performance? 1.: Query namedQuery = session.getNamedQuery(queryName); // ... return…
Pavel
  • 4,912
  • 7
  • 49
  • 69
0
votes
1 answer

Query eagerly loading blob in distinct query, how to lazy load?

ok, here's the exception I get, it's pretty obvious that the problem is trying to load a BLOB into a distinct query. Manually edited the BLOB out of the query and it was fine. Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
0
votes
0 answers

Hibernate 5.3 Propagation.REQUIRES_NEW not working

I have a method that I annotated with @Transactional(propagation = Propagation.REQUIRES_NEW). It is indirectly called from a method with @Transactional(propagation = Propagation.NOT_SUPPORTED) which should interrupt every existing transaction for…
XtremeBaumer
  • 6,275
  • 3
  • 19
  • 65
0
votes
1 answer

Hibernate 5 - programatically adding hbm mapping to the configuration - no named queries found

In the process of migrating an old app from JBoss 5.1.0GA to WildFly 13. On the previous server we were using hibernate3 while on WildFly 13 we're trying to use hibernate 5. A bit on the app - it's built as a multi-tenant app so it has tables that…
Sergiu
  • 2,502
  • 6
  • 35
  • 57
0
votes
0 answers

@SequenceGenerator not generating sequence

Whatever I am gonna say is very strange and very true, Please don't give negative marking. Hibernet-core : 5.2.14 Spring -boot 2.0 DB : Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit This should create a sequence by the name…
Gaurav Saraf
  • 23
  • 1
  • 11
0
votes
2 answers

Hibernate5 not getting transaction with Spring5?

I'm using Hibernate5.3 and Spring5.0.6. And I want to use EntityManager in JPA so this is the config: @Configuration @EnableTransactionManagement public class HibernateConfig { @Bean public LocalContainerEntityManagerFactoryBean…
Daniel
  • 15
  • 9
0
votes
1 answer

A lot of hibernate tests done when try I try to Run simple Junit test in spring

I have a project that uses the following tools and frameworks: Spring mvc 5, hibernate 5, junit 5 and maven. I wrote a simple test class as the following: @ExtendWith(SpringExtension.class) @ContextConfiguration(classes=DBConfig.class) public class…
M.R.M
  • 540
  • 1
  • 13
  • 30
0
votes
0 answers

os authentication hibernate 5

I would like to use OS authentication to connect to an Oracle database using hibernate 5. Below is the relevant section of the hibernate.cfg.xml that I am using.
Tony B
  • 1
  • 1
  • 2
0
votes
0 answers

Hibernate Save/Update/Delete OneToMany relationship

I have OneToMany relationship in my Hibernate Entitylike below: Form Entity: @Entity @Table(name = "form_master") public class Form { private long id; private String name; private List questions; @Id …
Suvonkar
  • 2,440
  • 12
  • 34
  • 44
0
votes
1 answer

Correct and complete configuration for Spring Boot 1.5.x for Hibernate 5

About Spring Boot for the 1.5.10.RELEASE version. It works internally around with Hibernate for version 5.0.12.Final With the purpose to avoid the following error message: required a bean of type 'org.hibernate.SessionFactory' that could not be…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
0 answers

How to generate DDL script from annotated classes using Hibernate 5?

I've seen a lot of results regarding generate SQL from Hibernate beans, however, I am still a little bit confused regarding the best way to do that, and also compatibility with Hibernate versions. I have tried some of these examples I found and none…
user3619911
  • 107
  • 1
  • 9
0
votes
1 answer

JPA Hibernate 5: OneToOne in nested Embeddable causes metamodel issue

I have an entity: @Entity public class Test { @Embedded Content content; // getters setters.. } This contains an embedded class as you can see: @Embeddable public class Content { @OneToOne Person person; @Embedded …
onderbewustzijn
  • 935
  • 7
  • 32
0
votes
0 answers

Hibernate 5 Transient variable not populating

I have an User pojo class, when I am using Hibernate 4.2.0 Final version, transient member populating to the object while serialization but its not populating while using Hibernate 5.0.3.Final version. What configuration required in Hibernate 5…
0
votes
1 answer

Why an @ManyToMany should caused a NullPointerException?

I know that it could be too much vague but what could cause a NullPointerException after adding a @ManyToMany in my jpa entities? All code is the same, I deleted only the entity linked to the croos table and modified the two entities that before…
Filippo1980
  • 2,745
  • 5
  • 30
  • 44
0
votes
0 answers

Hibernate 5 mapping another table column with annotations

I have this tables in SQL -TABLE CATEGORY- ID_CATEGORY, NAME -TABLE CATEGORY_EVENTS- ID_CATEGORY, ID_EVENT, COLUMNIWANT -TABLE EVENTS- ID_EVENT, NAME Then I have my entitys in java like this Category.java: @Id @GeneratedValue(strategy =…