来自 HBM 文件的 POJO [英] POJO from HBM file

查看:15
本文介绍了来自 HBM 文件的 POJO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是 hibernate 的新手,我想从 xxx.hbm.xml 文件创建 POJO.

I am new to hibernate and I would to create POJO from xxx.hbm.xml file.

有可能吗?请回复.

推荐答案

Hibernate 工具 包含一个 Ant 任务,允许从映射文件(除其他外)生成 Java 代码.检查部分 4.4.2.文档中的 POJO java 代码导出器 ().

The Hibernate Tools include an Ant Task allowing to generate Java code from mapping files (amongst other things). Check the section 4.4.2. POJO java code exporter (<hbm2java>) in the documentation.

Hibernate3 Maven Plugin 也支持这一点(使用hibernate3:hbm2java 目标).

The Hibernate3 Maven Plugin also supports this (with the hibernate3:hbm2java goal).

这篇关于来自 HBM 文件的 POJO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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