Grails项目:用于旧式数据库映射的Gorm或JPA/Hibernate批注? [英] Grails project: Gorm or JPA/Hibernate annotations for legacy db mapping?

查看:109
本文介绍了Grails项目:用于旧式数据库映射的Gorm或JPA/Hibernate批注?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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批注?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆