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

wrong domain/table mapping for abstract class containing id and version properties #9692

Closed
zyro23 opened this issue Feb 14, 2016 · 0 comments

Comments

@zyro23
Copy link
Contributor

zyro23 commented Feb 14, 2016

trying to work around #9678 by adding Long id and Integer version to an abstract base class in src/main/groovy, I got an exception because of a wrong query was generated (table name is the mapped class name of the abstract class).

seems the cause is that the abstract class is somehow treated like a concrete (domain) class in terms of table-mapping if it contains id and version properties.

was not sure if this is a core or a gdm issue. created it here.

referenced sample app shows described behavior. dbconsole shows table name ABSTRACT_BASE_CLASS, if id/version are commented out in AbstractBaseClass, table name is CONCRETE_DOMAIN.

zyro23 added a commit to zyro23/grails-core-9692 that referenced this issue Feb 14, 2016
@graemerocher graemerocher added this to the grails-3.1.2 milestone Feb 15, 2016
graemerocher added a commit to grails/gorm-hibernate4 that referenced this issue Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants