Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.3.3, 1.3.4
-
Fix Version/s: 1.3.5
-
Component/s: Persistence
-
Labels:None
Description
Much like GRAILS-6405, you can't extend an abstract class in src/java:
Put this in grails-app/domain:
class User extends AbstractDomain {
String name
}
and this in src/java:
public abstract class AbstractDomain {
}
and User isn't recognized as a domain class.
It was working as of grails-1.3.0.
-
Hide
- grails6662.zip
- 30/Aug/10 3:41 PM
- 185 kB
- Jeff Brown
-
- grails6662/.classpath 0.7 kB
- grails6662/.gitignore 0.0 kB
- grails6662/.project 0.5 kB
- grails6662/.../org.codehaus.groovy.eclipse.preferences.prefs 0.1 kB
- grails6662/application.properties 0.2 kB
- grails6662/grails-app/.../BootStrap.groovy 0.1 kB
- grails6662/grails-app/.../BuildConfig.groovy 1 kB
- grails6662/grails-app/conf/Config.groovy 3 kB
- grails6662/grails-app/.../DataSource.groovy 0.8 kB
- grails6662/grails-app/.../UrlMappings.groovy 0.2 kB
- grails6662/grails-app/.../resources.groovy 0.0 kB
- grails6662/.../CarController.groovy 4 kB
- grails6662/.../PersonController.groovy 4 kB
- grails6662/grails-app/.../demo/Car.groovy 0.1 kB
- grails6662/grails-app/.../demo/Person.groovy 0.1 kB
- grails6662/.../messages.properties 3 kB
- grails6662/.../messages_da.properties 3 kB
- grails6662/.../messages_de.properties 4 kB
- grails6662/.../messages_es.properties 3 kB
- grails6662/.../messages_fr.properties 2 kB
- grails6662/.../messages_it.properties 2 kB
- grails6662/.../messages_ja.properties 2 kB
- grails6662/.../messages_nl.properties 3 kB
- grails6662/.../messages_pt_BR.properties 3 kB
- grails6662/.../messages_pt_PT.properties 3 kB
- grails6662/.../messages_ru.properties 4 kB
- grails6662/.../messages_th.properties 5 kB
- grails6662/.../messages_zh_CN.properties 2 kB
- grails6662/grails-app/.../car/create.gsp 3 kB
- grails6662/grails-app/views/car/edit.gsp 3 kB
Issue Links
- is related to
-
GRAILS-6405
Domain classes cannot extend class in src/groovy
-
-
GRAILS-3209
GORM inheritance related bug with id: this.id == null != this.getId() when accessed in method for a class that is subclassed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Apologies. As soon as I uploaded that I realized that the source file under src/java is actually Groovy source file, not a Java source file. I can reproduce the problem with a Java source file. Will get it fixed.
Thanks for your help.
I am experiencing this problem but for abstract groovy classes (as per the linked issue GRAILS-6405). It was working in Grails 1.3.1, but stopped working when I upgraded to 1.3.4! Should I create another issue for this, or will this be fixed as part this issue?
Alisdair,
No need to create another issue. We will have a fix for this committed soon. Thanks for the help.
Note that there is a relevant test at http://github.com/grails/grails-core/commit/d438a670e9fbbe0e66a9ddee47a7eb760aa498da which was subsequently reverted with http://github.com/grails/grails-core/commit/595320a114c015341792f4af90e47c7288834789
Attaching a 1.3.4 application in which it appears that this is working as designed. If you can provide an example that demonstrates the problem, that would be helpful.
Thanks.