问题描述
在grails应用程序中,我必须创建一堆grails域类,它们映射到一个非常老的数据库.
In a grails app, I have to create a bunch of grails domain classes mapped to a very old db.
这个非常老的数据库为表和列使用了许多笨拙"的不可读名称.
这些表经常包含(太多)列.
This very old db is using a lots of "funky" unreadable names for tables and columns.
These tables contains (too) often (too) many columns.
我当时正在考虑对所有关系使用静态映射,并对列名称使用JPA批注(几乎所有列都需要重命名,并且映射部分将变成象素)
I was thinking of using the static mapping for all the relationship and using the JPA annotations for the columns names (almost all columns needs to be renamed and the mapping section will be elephantine)
这种混合方式可行吗?
如果是,那是我必须避免的事情吗?
Is this kind of mix is possible ?
If yes, is it something that I must avoid ?
推荐答案
查看以下内容: http://www.ibm.com/developerworks/library/j-grails07158 /index.html
这篇关于Grails项目:用于旧式数据库映射的Gorm或JPA/Hibernate批注?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!