Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #42, #41, #40, #39 #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ CREATE TABLE IF NOT EXISTS customers (

CREATE TABLE IF NOT EXISTS orders (
id SERIAL PRIMARY KEY,
subtotal DECIMAL(18,2)
customer_id INT REFERENCES customers(id),
subtotal DECIMAL(18,2),
customer_id INT REFERENCES customers(id)
);

CREATE TABLE IF NOT EXISTS products (
Expand All @@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS products (
CREATE TABLE IF NOT EXISTS product_orders (
id SERIAL PRIMARY KEY,
product_id INT REFERENCES products(id),
order_id INT REFERENCES orders(id) ON DELETE CASCADE
order_id INT REFERENCES orders(id)
);
```

Expand Down
Binary file modified java/hibernate/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions java/hibernate/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jan 31 17:56:55 EST 2017
#Thu Sep 21 16:46:58 CDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
4 changes: 2 additions & 2 deletions java/hibernate/src/main/resources/hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql://127.0.0.1:26257/company_hibernate?sslmode=disable</property>
<property name="connection.url">jdbc:postgresql://127.0.0.1:26257/company_java_hibernate?sslmode=disable</property>
<property name="connection.username">root</property>

<!-- JDBC connection pool (use the built-in) -->
Expand All @@ -23,7 +23,7 @@

<!-- Drop and re-create the database schema on startup -->
<!--<property name="hbm2ddl.auto">validate</property>-->
<property name="hbm2ddl.auto">update</property>
<property name="hbm2ddl.auto">none</property>

<!-- org.hibernate.HibernateException: No CurrentSessionContext configured! -->
<property name="hibernate.current_session_context_class">thread</property>
Expand Down