I have an existing PostgreSQL DB. I need to generate the Java classes. The IDE and tools I’m using are chosen by employer. Basically, I’m trying to set up a Maven Build that will connect to the Postgres DB and then generate the Java code for me (with all of the appropriate annotations so that they can be compiled and then imported into Drools. I just can’t find any documentation what will explain how this would be done. I have spent hours at it and there are always missing classes or configuration with undecipherable messages (i.e. a missing class with no clue on how to resolve it).
One example of one of the issues I’m having right now is that it says the driver for the DB is missing yet it is in the hibernate.properties file and the hibernate.cfg.xml file.
Where is a document (not a video since those are too hard to reference). That explains how to do this with a Maven Build job?
Hi,
That was nice, it was a working example (almost, but after some tweaking, I got it to work). However; it would be really nice if you could point me to the documentation. For example:
Default batch fetch size: 1
[INFO] Generate SQL with comments: disabled
[INFO] Order SQL updates by primary key: disabled
[INFO] Order SQL inserts for batching: disabled
[INFO] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[INFO] Using ASTQueryTranslatorFactory
[INFO] Query language substitutions: {}
[INFO] JPA-QL strict compliance: disabled
[INFO] Second-level cache: enabled
[INFO] Query cache: disabled
[INFO] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
[INFO] Optimize cache for minimal puts: disabled
[INFO] Structured second-level cache entries: disabled
[INFO] Echoing all SQL to stdout
[INFO] Statistics: disabled
[INFO] Deleted entity synthetic identifier rollback: disabled
[INFO] Default entity-mode: pojo
All these “option values” are listed, but I don’t know where to find the definition of them so that I know whether or not they should be adjusted.
Hi @beikov How to do this for latest hibernate 6 as there is no plugin for latest 6 series as there is no plugin for hibernate 6 and Hibernate JBoss tools is having some problems with Jakarta persistence.