如何生成JPA实体元模型? [英] How to generate the JPA entity Metamodel?

查看:34
本文介绍了如何生成JPA实体元模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本着与 CriteriaQuery JPA 2.0 还有一个 API 来支持 Metamodel 实体的表示.

In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support Metamodel representation of entities.

有没有人知道这个 API 的全功能实现(生成元模型而不是手动创建元模型类)?如果有人也知道在 Eclipse 中设置它的步骤,那就太棒了(我认为它就像设置注释处理器一样简单,但你永远不知道).

Is anyone aware of a fully functional implementation of this API (to generate the Metamodel as opposed to creating the metamodel classes manually)? It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it's as simple as setting up an annotation processor, but you never know).

刚刚偶然发现 Hibernate JPA 2 Metamodel Generator .但问题仍然存在,因为我找不到 jar 的任何下载链接.

Just stumbled across Hibernate JPA 2 Metamodel Generator . But the issue remains since I can't find any download links for the jar.

编辑 2:自从我问这个问题以来已经过去了一段时间,但我想我会回来并添加一个链接到 SourceForge 上的 Hibernate JPA 模型生成器项目

EDIT 2: Awhile has passed since I asked this question, but I thought I'd come back and add a link to the Hibernate JPA Model Generator project on SourceForge

推荐答案

如果有人也知道在 Eclipse 中设置它的步骤,那就太棒了(我认为它就像设置注释处理器一样简单,但你永远不知道)

It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it's as simple as setting up an annotation processor, but you never know)

是的.以下是各种 JPA 2.0 实现的实现和说明:

Yes it is. Here are the implementations and instructions for the various JPA 2.0 implementations:

最新的 Hibernate 实现位于:

The latest Hibernate implementation is available at:

较旧的 Hibernate 实现位于:

An older Hibernate implementation is at:

这篇关于如何生成JPA实体元模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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