从Glassfish 3.1 for Eclipse 3.7中的表生成实体 [英] Generate entities from tables in Glassfish 3.1 for Eclipse 3.7

查看:89
本文介绍了从Glassfish 3.1 for Eclipse 3.7中的表生成实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过本教程了解更多关于Glassfish。我在舞台从DB表创建Java实体,本教程指导在EJB项目的上下文菜单中(只有在那里),您可以找到 JPA工具/从表生成实体。但是,我在EJB项目菜单中找不到该选项。我想这个教程有点陈旧,并且基于先前版本的GF for Eclipse。任何人都可以告诉这些更新的功能,即如何从DB生成Java实体类,以便我可以继续使用我的教程?

I am trying to go through this tutorial to learn more on Glassfish. I am at the stage of creating Java entities from DB tables and the tutorial instructs to " In the context menu of the EJB project (and only there) you’ll find JPA Tools / Generate Entities from Tables". However, I can't find that option in the EJB project menu. I suppose the tutorial is a bit stale and based off of a previous version of GF for Eclipse. Can anybody tell what the updated functionality of this is, i.e. how to generate Java entity classes from DB so I can carry on with my tutorial?

谢谢

推荐答案

对不起,我现在注意到了这个问题,我会回答一下,虽然觉得太晚了
JPA工具一般不包括在EJP项目中,因此您必须手动包含它们:在您的EJB的属性中选择项目构面和下一个选项检查JPA。之后,您将在EJP中找到JPA工具,只需右击EJP项目即可。
希望帮助某人。

Sorry, i have noticed this question right now, i'll answer it although think it's too late. JPA tools generally are not included in EJP Projects so you have to include them manually: go in Properties of your EJB, select between the options Project Facets and next check JPA. After it, you'll find JPA tools in EJP just pressing right click on your EJP project. Hope it helped to someone.

这篇关于从Glassfish 3.1 for Eclipse 3.7中的表生成实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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