Can a Grails domain class inherit from a class that is not a domain class?

I tried to do this, but he insists that they are a base class table. I also tried using tablePerHierarchy false, and that didn't make any difference.

I have several domain classes that share a bunch of methods that work in an inherited transition field. I was hoping that in order for GORM to be enough, the class in the partition without the "/ src / ..." domain should be enough to understand that the database does not have a base class.

When I put the class in the src section, I get another error. It no longer displays a specific class. Error 500: org.springframework.orm.hibernate3.HibernateQueryException: the resulting page is not displayed [from the Summarypage, where id =?]; The nested exception is org.hibernate.hql.ast.QuerySyntaxException: the summary page is not displayed [from the Summarypage, where id =?]

+3
source share
1 answer

I get it. If the base class is an abstract class, it does the right thing.

Thanks to everyone, everyone.

+5
source

Source: https://habr.com/ru/post/1725913/


All Articles