开发者

How to save inherited objects in hibernate

开发者 https://www.devze.com 2023-03-05 21:32 出处:网络
I have three classes Rule Contract Trip and class Contract ext开发者_开发技巧ends Rule.and class Trip has contract object .

I have three classes

Rule Contract Trip and class Contract ext开发者_开发技巧ends Rule.and class Trip has contract object . TripInstance.contract = contractObj TripInstance.save()

i am not able to save the contract in to table trip.


By default, Grails sets all properties on domain objects to nullable: false. Since it seems like you're getting a validation error, you might want to make sure that you've added all of the appropriate properties to the instance before you save it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号