Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to change name of the foreign key used to map an association in Grails
- class AreaServer {
- String serverId
- ...
- ...
- static hasMany = [ serverProtocol : ServerProtocol ]
- static mapping = {
- serverProtocol lazy:false
- id name: 'serverId', generator: 'assigned'
- serverProtocol column: 'server_serverId'
- }
- class ServerProtocol {
- long dbId
- ....
- ....
- static belongsTo = [ areaServer : AreaServer ]
- static mapping = {
- id name: 'dbId'
- version false
- }
Add Comment
Please, Sign In to add comment