![]() |
1
2
The problem is arguably a bug in gorm (maybe hibernate, not sure where the root of the bug lies) in that it does not persist abstract classes and breaks polymorphic relationships . Presumably you've got a
in your MaintenanceTask class. If your MaintenanceSchedule class is really just like it appears in your post, you can work around the problem by removing the abstract descriptor on the class. If you want to prevent someone from creating a MaintenanceSchedule you can explicitly add a protected no argument constructor. If you want to have abstract methods in the MaintenanceSchedule then the approach doesn't work so well. But, if you either remove the abstract keyword or the relationship on MaintenanceTask your compiler error should go away. |
![]() |
2
0
In Grails version 1.4 this is going to be solved. It's actually solved... but we have to wait to the 1.4 stable version be released. |
![]() |
Montaser Majid · 用于从多行中提取单行的SQL查询 3 年前 |
![]() |
Chance · 根据Sequelize中的字段拉入特定记录/行 3 年前 |
![]() |
lambchop01 · GORM如何为相似实体之间的关系建模 3 年前 |
![]() |
Shale · 如何将此查询更改为ORM? 3 年前 |
![]() |
Daniel Morales · 替换mongo DB中的嵌入字段 3 年前 |
![]() |
Vinay P · NodeJS和ORM? 7 年前 |
![]() |
MadDoctor5813 · 在Django模型中创建“简单”字典? 7 年前 |