Skip to content

ochaloup/hibernate-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibernate standalone test app

Hibernate standalone test application using JPA api to generate database schema and then persist and query an item.

How to run

Getting run a database

Download jdbc driver (e.g. for PostgreSQL, see https://jdbc.postgresql.org/download.html) and run the database itself. The easiest way is probably with Docker

docker run -p 5432:5432 --rm  -ePOSTGRES_USER=test -e POSTGRES_PASSWORD=test postgres:9.4 -c max-prepared-transactions=110 -c log-statement=all

Run the app

If your database is running at different machine than at localhost:5432 or with different credentials than test/test then consider to make changes in src/main/resources/persistence.xml.

mvn clean package
java -cp target/hibernate-standalone-1.0-SNAPSHOT-jar-with-dependencies.jar:./postgresql-42.2.2.jar:. cz.chalda.Main

About

A playground for working with hibernate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages