I am having monthly domain classes to partition transactions into by month basis [TxnSummaryJan, TxnSummaryFeb..etc]. Now I am trying to create a Month domain class which is abstract and has all the fields defined in it so that the Jan,Feb classes just extend this class and thats it. Now I have set the
tablePerHierarchy = 0
in the mapping for the month class so that grails does not create a table for this class.
Now the tables are getting created properly but when I execute
Month.createCriteria().get( eq('userid',1)).list()
it gives me error that get() function is not available to Month class. But it runs when I give for example
TxnSummaryJan.createCriteria().get(eq('userid',1)).list()
What am I missing here since according to the domain model I should get the results when I query the base class?
Also where to place the Month Domain class? Do I need to place the Month Domain outside of src/Domain so that its table is not created?
Regards Priyank