How is class inheritance hierarchy being mapped by Grails mongodb plugin? -
we using mongodb plugin in grails.
so found code, domain object called address:
public class address extends embededdomain{ static mapwith = "mongo" region region; zone zone; static mapping = { id generator: 'identity' region reference:true zone reference:true } } embededdomain class in src/groovy
class embeddeddomain { public embeddeddomain() { this.datecreated = new date() this.lastupdated = new date() } } then have organization domain relationship organization has address:
class organization { static mapwith = "mongo" address address static mapping = { id generator: 'identity' } } what region reference:true mean?
after saving anorganization when enter command show collections in mongodb console not seeing collection name address? rather seeing collection name embededdomain contains address, why happening embededdomain groovy class.
Comments
Post a Comment