Take a domain class:
class ArtistMonitor {
static belongsTo = UserProfile
UserProfile userProfile
Artist artist
}
If you do new ArtistMonitor().save() you get no errors, even though there are missing references. All columns default to nullable: false and optional: false apparently, so why is this happening?
Also, and with more complexity, you get no errors when saving the class that references this i.e:
def u = new UserProfile( ...)
u.addArtistMonitor(new ArtistMonitor())
u.save()
No errors at all occur. If you save the monitor first explicitly, still no errors exist on the artistMonitor instance.
Related to GRAILS-890 possibly.