Open session in view was switched off accidentally a while ago. Also
the mapping changes recently meant that the changes to @Valid model
attributes were not being propagated correctly.
Fixes#946 and #947
This is reverting a workaround for a Hibernate "feature". There's
no need for the child entities (Pet and Visit) to know about their
parent (foreign key). Hibernate can manage that just fine with a
@JoinColumn. But it needs a nullable foreign key column in the
DB schema. That's the downside. The upside is much less code in
Java.
The postgres user needs to be an owner of the public schema or a
superuser in order to execute the schema.sql for database
initialization.
To avoid that, two changes are required:
- use `CREATE TABLE IF NOT EXISTS` in order to idempotently create the
necessary tables
- handle conflicts when inserting duplicate data
This follows the pattern in use by the
src/main/resources/db/mysql/{data,schema.sql} files.
Authored-by: Shaan Sapra <shsapra@vmware.com>
The current docker-compose.yml is still in version 1, which is
deprecated: https://docs.docker.com/compose/compose-file/compose-versioning/
So if you try to run `docker-compose up` with a recent version of
docker-compose, the following error occurs:
(root) Additional property mysql is not allowed
Version 2.2 was chosen because it's not deprecated, but it also has been
released some time ago: Compose version 2.2 requires docker engine
version 1.13.0, which was released on 2017-01-18. So, with this version,
hopefully no users will have any issues either with deprecation warnings
or with a version that is not yet supported by their docker-engine.