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

Grails 4.0.0 Sequence-per-table configuration #124

Open
Noxville opened this issue Oct 2, 2019 · 4 comments
Open

Grails 4.0.0 Sequence-per-table configuration #124

Noxville opened this issue Oct 2, 2019 · 4 comments

Comments

@Noxville
Copy link

Noxville commented Oct 2, 2019

According to the installation guide it says:

For Hibernate 5 add the following to application.groovy

grails.gorm.default.mapping = {
    id generator: 'org.hibernate.id.enhanced.SequenceStyleGenerator', params: [prefer_sequence_per_entity: true]
}

This seems a bit weird/outdated/incorrect since my application.groovy looks like a spring boot boilerplate main (https://gist.github.com/Noxville/1a5232908f2fd19296261607a7244435).

@ilopmar
Copy link
Collaborator

ilopmar commented Oct 2, 2019

That comment refers to ./grails-app/conf/application.groovy and not ./grails-app/init/.../Application.groovy

@ilopmar
Copy link
Collaborator

ilopmar commented Oct 2, 2019

Fixed by @erichelgeson in #125

@ilopmar ilopmar closed this as completed Oct 2, 2019
@Noxville
Copy link
Author

Noxville commented Oct 2, 2019

Hey there, thanks for that fix @ilopmar, however even with that I'm still not seeing correctly generated sequences per table. Here's a gist with the relevant files: https://gist.github.com/Noxville/87e583d9a4340804a15afc75a87b0a81

@ilopmar ilopmar reopened this Oct 2, 2019
@ilopmar
Copy link
Collaborator

ilopmar commented Oct 2, 2019

@Noxville I haven't tried it with Grails 4. TBH I don't use it now but I keep maintaining it and merging PR from the community.

@erichelgeson have you tried the plugins with Grails 4 and the sequence per table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants