Grails

Significance of “mappedBy” in Grails Domain

“mappedBy” is a static map which is used to determine and change the way two associated domain classes interact with each other. Let’s start with the role of “mappedBy” in one-to-many relationships. Consider the following Example:- [code]class Team {     static hasMany = [members: TeamMember] }[/code]   [code]class TeamMember {     Team memberOf     Team captainOf }[/code] The Team […]

Naman Gautam
Naman Gautam
Read