See PR #2837 for 5.0.x branch.
PRs for master and 5.1.x follow as soon as this PR gets approved.
> Am 10.08.2017 um 11:25 schrieb robertoschwald <robertoschw...@gmail.com>:
> Shouldn't cause a problem, since Hibernate determines the sequence type
> automatically on "native" in org.hibernate.dialect.Dialect.
> I test and send in PRs for the 3 branches.
> On Wednesday, August 9, 2017 at 6:24:23 PM UTC+2, robertoschwald wrote:
> Hi all,
> Currently CAS (5.x) does not play well with Galera db cluster when using JPA
> In Galera, each table must hold a PK to support deletes
> Therefore, it is mandatory to set the MariaDB option
> "innodb_force_primary_key=1“, to ensure all tables hold a primary key.
> As the CAS Entity IDs are annotated with @GeneratedValue(strategy =
> GenerationType.AUTO), Hibernate (5.x) picks the table generator instead of
> identity, so tries to create the hibernate_sequence table in DDL.
> See https://hibernate.atlassian.net/browse/HHH-11014
> As the hibernate_sequence table does not have a PK, creation fails in Galera
> with: java.sql.SQLSyntaxErrorException: This table type requires a primary
> Also, performance is quite bad in MySQL, as the table generator uses an
> additional, separate transaction to fetch a sequence value.
> There are several approaches to workaround this issue:
> - Set generator=„native“ in @GeneratedValue
> - Change strategy to „SEQUENCE“ by default and provide a JPA XML mapping that
> overwrites the Java based annotation mapping (see
> - Create the hibernate_sequence table manually and provide a ID PK column
> - Mark Galera as unsupported in CAS docs.
> You received this message because you are subscribed to the Google Groups
> "CAS Developer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cas-dev+unsubscr...@apereo.org
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/
You received this message because you are subscribed to the Google Groups "CAS
To unsubscribe from this group and stop receiving emails from it, send an email
Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.