Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GRAILS-6662 - improving the handling of domain classes that extend Ja…
…va classes under src/java. This work is still pending testing, specifically as it relates to GRAILS-6405 and GRAILS-3209.
- Loading branch information
Jeff Brown
committed
Sep 9, 2010
1 parent
6c7f77b
commit d438a67
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/test/org/codehaus/groovy/grails/orm/hibernate/AbstractJavaClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.codehaus.groovy.grails.orm.hibernate; | ||
|
||
public class AbstractJavaClass { | ||
} |
19 changes: 19 additions & 0 deletions
19
src/test/org/codehaus/groovy/grails/orm/hibernate/JavaInheritanceTests.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.codehaus.groovy.grails.orm.hibernate | ||
|
||
class JavaInheritanceTests extends AbstractGrailsHibernateTests{ | ||
protected void onSetUp() { | ||
gcl.parseClass ''' | ||
import grails.persistence.* | ||
@Entity | ||
class MyDomainClass extends org.codehaus.groovy.grails.orm.hibernate.AbstractJavaClass { | ||
String someProperty | ||
} | ||
''' | ||
} | ||
|
||
void testInheritingFromAbstractJavaClass() { | ||
def mdc = ga.getDomainClass("MyDomainClass") | ||
assertNotNull 'MyDomainClass is not considered a domain class', mdc | ||
} | ||
} |