orm - How would I map this existing DB in Grails? -


we have existing oracle database , map in grails 2.2.3 can use gorm. have authorization table has primary keys in several entities such fund, organization, account, etc. here table looks like:

table: phone_auth  id             not null     number auth_code                   varchar2 fund                        varchar2 organization                varchar2 account                     varchar2 

the fund, organization, , account columns primary keys map records in other tables (the fund table, account table, etc.) how map in grails? need use static embedded = ['fund', 'organization', 'account']? or use mappedby in way? thank you!

so this

class phoneauth {      string authcode     fund fund     organization organization     account account      static mapping = {         table 'phone_auth'         version false         fund column: 'fund'         organization column: 'organization'         account column: 'account'     } } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -