Grails 2.2.2: grails-app/utils classes are treated as domain?!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 2.2.2: grails-app/utils classes are treated as domain?!

Konstantyn Smirnov
Hi All

I'm facing the strange behavior in my new plugin-project powered by G2.2.2 (that's why I didn't see the problem in older versions)

I have a class in the utils/ :

@Validateable
class DayMask {
 // nothing special here
}

When I start the app, the table gets created in the DB, along with some domain-classes.

It's not really critical, as the instances will never be persisted in the db, but quite annoying....

Has something changed with the DC definition in 2.2.2?
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.2.2: grails-app/utils classes are treated as domain?!

Jeff Scott Brown



On Fri, May 3, 2013 at 2:57 AM, Konstantyn Smirnov <[hidden email]> wrote:
Hi All

I'm facing the strange behavior in my new plugin-project powered by G2.2.2
(that's why I didn't see the problem in older versions)

I have a class in the utils/ :

@Validateable
class DayMask {
 // nothing special here
}

When I start the app, the table gets created in the DB, along with some
domain-classes.

It's not really critical, as the instances will never be persisted in the
db, but quite annoying....

Has something changed with the DC definition in 2.2.2?



Please file a JIRA.

Why are you defining the source for that in grails-app/utils/ anyway?  You should probably be putting that under src/groovy/.



JSB
--
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.2.2: grails-app/utils classes are treated as domain?!

Konstantyn Smirnov
done: http://jira.grails.org/browse/GRAILS-10078

Well, the utils/ seems to be a good place for e.g. command objects.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.2.2: grails-app/utils classes are treated as domain?!

Jeff Scott Brown



On Fri, May 3, 2013 at 7:18 AM, Konstantyn Smirnov <[hidden email]> wrote:
done: http://jira.grails.org/browse/GRAILS-10078

Well, the utils/ seems to be a good place for e.g. command objects.



Command objects should be defined in a controller's source file or under src/groovy.  I think the only things that currently belongs under grails-app/utils/ are codecs.



Jeff 

--
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/