GORM: What is reference:true in Grails domain class mapping block? -


public class address {     static mapwith = "mongo"      region region;     zone zone;      static mapping = {         id generator: 'identity'         region reference:true         zone reference:true     } } 

i'm interested in knowing reference:true does.

in experience, leaving off gives same result except there's no dbref in actual mongo document.

it looks reference controlls how documents linked.

when true, related documents referenced db-refs, if false, gorm inserts simple id, aka manual references in mongo


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -