Open GoogleCodeExporter opened 8 years ago
Thanks for creating this issue, I did some research about it.
Due to the nature of GroovyClassLoader on dynamic compilation which compile one
class at a time, please see
http://groovy.codehaus.org/api/groovy/lang/GroovyClassLoader.html#parseClass%28j
ava.lang.String%29
I have no idea how bi-directional association can be supported at the moment.
Original comment by limchee...@vobject.com
on 20 Dec 2011 at 9:44
pleaseif you have any new about this issue
Original comment by aziz.ait...@gmail.com
on 28 May 2013 at 4:36
I was able to make the hasMany/belongsTo work as well as the use of dynamic
finders.
1. The creation of dynamic domain class will be 2 step compilation. First
compile two classes without the hasMany/belongsTo relationship. Once done,
compile again with the hasMany/belongsTo relationship. This is in the
registerDomainClass method of the DynamicDomainService.
2. After compilation, execute the addDomainClass, registerBeans and
enhanceDomainClass. This is still under the DynamicDomainService.
3. Add the following in enhanceDomainClass method to enable the use of dynamic
finders.
HibernatePluginSupport.registerDynamicMethods(dc, fakeGrailsApplication, ctx,
ctx.sessionFactory)
This is still for further testing. Let me know your feedback on this. Thanks!
Original comment by frnzy2...@gmail.com
on 3 Jul 2013 at 9:41
Original issue reported on code.google.com by
calli...@gmail.com
on 13 Dec 2011 at 10:29