swzaidi opened a new issue, #14550:
URL: https://github.com/apache/grails-core/issues/14550

   I have the following domain classes in my test app
   
   -----
   class PricePlan {
   
       String id
       double price
   
       static mapping = {
           id type: 'string', generator: 'assigned'
           discriminator column: 'purchase_type'
       }
   }
   
   -----
   class RecurringPricePlan extends PricePlan {
   
       int durationInMonths
   
       static mapping = {
           discriminator 'Subscription'
       }
   }
   -------
   class SubscriptionPlan {
   
       PricePlan pricePlan
   
       static constraints = {
           pricePlan nullable: true
   
       }
   
       int getDurationInMonths() {
   
           pricePlan.durationInMonths
       }
   
   }
   -----
   
   Steps to reproduce
   1. save RecurringPricePlan
   2. Assign the saved RecurringPricePlan to new SubscriptionPlan
   3. save SubscriptionPlan
   4. Find SubscriptionPlan by id
   5. invoke  subscriptionPlan.getDurationInMonths()
   6. getting following exception
   groovy.lang.MissingPropertyException: No such property: durationInMonths for 
class: RecurringPricePlan
   Possible solutions: durationInMonths
   
   Can you please let me know why i am seeing this error?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to