Grails实体没有存留 [英] Grails Entity without persist
本文介绍了Grails实体没有存留的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在grails中有一个域类...如何让gorm在创建数据库时忽略此实体?如果我明白了,你不想从域类创建表?如果我明白了,你不想从域类创建表?如果是,请在域类中使用此代码:
static mapWith =none//禁用数据库持久化
I have a domain class in grails... How do I get gorm to leave out this entity when it create the db? Just leave it alone.
解决方案
If i understood, u want not create table from domain class? If yes, use this code inside domain class:
static mapWith = "none" // disable persisting into database
这篇关于Grails实体没有存留的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文