• (转)MyEclipse自动生成Hibernate实体类, oracle篇


    转自http://blog.csdn.net/hejinwei_1987/article/details/9465529

    1.打开 windows -> Open Perspective -> MyEclipse Java Persistence

    2.新建连接。这边需要导入classes12.jar。这个文件可以直接去oracle的安装目录中查找。点Add JARs导入。导入后,Driver classname会自动帮我们填好。

    3.创建好后,连接上。一直展开到用户名再到Table,再到具体的表,选中右键Hibernate Reverse Engineering..。之后就选择要生成的类所在的目录等等,按自己的需要生成了。

    遇到的问题:

    在上文第3步的时候,点击Browser按钮的时候出现一个灰色的窗口,没有项目可选。在网上查了下,发现是在.project中少一条,如下标红这条,加上就好了。

    <natures>
    <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
    <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>

  • 相关阅读:
    Linux thread 泄露问题
    QQ通讯原理
    小谈Onlinegame服务器端设计
    Linux 如何打开端口
    linux系统软件更新
    MVC
    wubi+ubuntu
    [转]openfire源码部署~
    Apache开源项目分类列表[转]
    [转]java.util.MissingResourceException: Can't find bundle for base name
  • 原文地址:https://www.cnblogs.com/liusijia/p/4932735.html
Copyright © 2020-2023  润新知