facebook

Hibernate Reverse Engineer DAO Missing Date fields

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #483364 Reply

    stevetague
    Participant

    Install:

    *** Date:
    Wednesday, May 18, 2016 2:45:26 PM MDT

    *** System properties:
    OS=Windows7
    OS version=6.1.0
    OS arch=amd64
    Profile arch=x86_64
    Window system=win32
    Java version=1.7.0_45
    Workspace=file:/C:/workspace_2016_04_13/
    VM Args=-Xmx768m
    -XX:MaxPermSize=320m
    -XX:ReservedCodeCacheSize=64m
    -Dosgi.nls.warnings=ignore
    -jar
    C:\Users\codeMonkey\AppData\Local\MYECLI~1\plugins/OR45D0~1.JAR

    *** Subscription information
    Product Id: E2MY (MyEclipse Standard Subscription)
    License version: 2.0
    Full Maintenance Included
    Subscription expiration date (YYYYMMDD): 20170222
    Number of users: 15

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 2015 Stable 3.0
    Build id: 13.0.0-20160113

    com.genuitec.eclipse.mobile.feature – 13.0.0.me201601121429
    com.genuitec.myeclipse.blue.feature – 13.0.0.me201601121429
    com.genuitec.myeclipse.database – 13.0.0.me201601121429
    com.genuitec.myeclipse.db2 – 13.0.0.me201601121429
    com.genuitec.myeclipse.desktop – 13.0.0.me201601121429
    com.genuitec.myeclipse.enterprise.workbench – 13.0.0.me201601121429
    com.genuitec.myeclipse.icefaces.feature – 13.0.0.me201601121429
    com.genuitec.myeclipse.imageeditor – 13.0.0.me201601121429
    com.genuitec.myeclipse.jsf – 13.0.0.me201601121429
    com.genuitec.myeclipse.maven – 13.0.0.me201601121429
    com.genuitec.myeclipse.persistence – 13.0.0.me201601121429
    com.genuitec.myeclipse.reports – 13.0.0.me201601121429
    com.genuitec.myeclipse.struts – 13.0.0.me201601121429
    com.genuitec.myeclipse.uml2 – 13.0.0.me201601121429
    com.genuitec.myeclipse.visualvm – 13.0.0.me201601121429
    com.genuitec.myeclipse.ws – 13.0.0.me201601121429
    com.genuitec.myeclipse.ws.blue – 13.0.0.me201601121429
    com.skyway.myeclipseforspring.feature – 13.0.0.me201601121429
    org.eclipse.birt – 4.4.1.me201601121429
    org.eclipse.datatools.connectivity.feature – 1.12.0.me201601121429
    org.eclipse.datatools.enablement.feature – 1.12.0.me201601121429
    org.eclipse.datatools.modelbase.feature – 1.12.0.v201406061321-7707GCcNBHLDaKTEcRi
    org.eclipse.datatools.sqldevtools.feature – 1.12.0.me201601121429
    org.eclipse.emf – 2.10.2.v20150123-0452
    org.eclipse.gef – 3.9.101.201408150207
    org.eclipse.graphiti.feature – 0.11.2.v20150204-0954
    org.eclipse.jpt.jpa.feature – 3.4.0.me201601121429
    org.eclipse.jpt.jpadiagrameditor.feature – 1.2.100.me201601121429
    org.eclipse.jst.common.fproj.enablement.jdt – 3.6.1.me201601121429
    org.eclipse.jst.enterprise_ui.feature – 3.6.1.me201601121429
    org.eclipse.jst.server_adapters.ext.feature – 3.3.300.me201601121429
    org.eclipse.jst.server_adapters.feature – 3.2.301.me201601121429
    org.eclipse.jst.server_ui.feature – 3.4.101.me201601121429
    org.eclipse.jst.ws.axis2tools.feature – 1.1.301.me201601121429
    org.eclipse.m2e.feature – 1.5.0.me201601121429
    org.eclipse.sapphire.platform – 8.1.2.201502231524
    org.eclipse.wst.common.fproj – 3.6.1.me201601121429
    org.eclipse.wst.server_adapters.feature – 3.2.401.me201601121429
    org.eclipse.xsd – 2.10.0.v20150123-0452
    org.springframework.ide.eclipse.feature – 3.6.2.me201601121429

    angularjs-eclipse-feature – 1.1.0.me201601121429
    angularjs-eclipse-jsp-feature – 1.1.0.me201601121429
    angularjs-eclipse-php-feature – 1.1.0.me201601121429
    com.collabnet.subversion.merge.feature – 3.0.13
    com.vmware.vfabric.ide.eclipse.tcserver – 3.6.2.me201601121429
    com.vmware.vfabric.ide.eclipse.tcserver.insight – 3.6.2.me201601121429
    fr.obeo.acceleo.bridge.feature – 2.6.0.me201601121429
    io.emmet.eclipse – 13.0.0.me201601121429
    net.jeeeyul.eclipse.themes.feature – 2.2.0.me201601121429
    net.jeeeyul.pdetools.feature – 1.2.5.me201601121429
    net.jeeeyul.swtend.feature – 2.2.5.me201601121429
    org.chromium.debug – 0.3.9.me201601121429
    org.chromium.sdk – 0.3.9.me201601121429
    org.chromium.sdk.wipbackends – 0.1.11.me201601121429
    org.dadacoalition.yedit.feature – 1.0.18.me201601121429
    org.eclipse.cvs – 1.4.100.v20150204-1700
    org.eclipse.draw2d – 3.9.101.201408150207
    org.eclipse.e4.rcp – 1.3.101.v20150204-1353
    org.eclipse.ecf.core.feature – 1.1.0.v20141221-2352
    org.eclipse.ecf.core.ssl.feature – 1.0.0.v20141221-2352
    org.eclipse.ecf.filetransfer.feature – 3.9.2.v20141221-2352
    org.eclipse.ecf.filetransfer.httpclient4.feature – 3.9.2.v20141221-2352
    org.eclipse.ecf.filetransfer.httpclient4.ssl.feature – 1.0.0.v20141221-2352
    org.eclipse.ecf.filetransfer.ssl.feature – 1.0.0.v20141221-2352
    org.eclipse.egit – 3.7.0.201502260915-r
    org.eclipse.epp.mpc – 1.3.2.v20150204-1930
    org.eclipse.equinox.p2.core.feature – 1.3.0.v20140523-0116
    org.eclipse.equinox.p2.discovery.feature – 1.0.200.v20140512-1802
    org.eclipse.equinox.p2.extras.feature – 1.2.0.v20150129-0838
    org.eclipse.equinox.p2.rcp.feature – 1.2.0.v20140523-0116
    org.eclipse.equinox.p2.user.ui – 2.2.0.v20150129-0838
    org.eclipse.help – 2.0.103.v20150204-1700
    org.eclipse.jdt – 3.10.1.v20150204-1700
    org.eclipse.jet – 1.1.1.v201101271243-5319sC7HCAGERASDK3924
    org.eclipse.jet.uml2 – 1.1.0.v201006011447-2-07w311A1A152813
    org.eclipse.jgit – 3.7.0.201502260915-r
    org.eclipse.jgit.java7 – 3.7.0.201502260915-r
    org.eclipse.jsf.feature – 3.8.0.me201601121429
    org.eclipse.mylyn.bugzilla_feature – 3.14.2.v20150217-2341
    org.eclipse.mylyn.commons – 3.14.2.v20150217-2244
    org.eclipse.mylyn.commons.identity – 1.6.2.v20150217-2244
    org.eclipse.mylyn.commons.notifications – 1.6.2.v20150217-2244
    org.eclipse.mylyn.commons.repositories – 1.6.2.v20150217-2244
    org.eclipse.mylyn.context_feature – 3.14.2.v20150218-0125
    org.eclipse.mylyn.cvs – 1.6.2.v20150217-2249
    org.eclipse.mylyn.discovery – 3.14.2.v20150217-2244
    org.eclipse.mylyn.gerrit.feature – 2.5.2.v20150218-1541
    org.eclipse.mylyn.git – 1.6.2.v20150217-2249
    org.eclipse.mylyn.ide_feature – 3.14.2.v20150218-0125
    org.eclipse.mylyn.java_feature – 3.14.2.v20150218-0125
    org.eclipse.mylyn.monitor – 3.14.2.v20150217-2244
    org.eclipse.mylyn.reviews.feature – 2.5.2.v20150218-0125
    org.eclipse.mylyn.tasks.ide – 3.14.2.v20150217-2341
    org.eclipse.mylyn.team_feature – 3.14.2.v20150218-0125
    org.eclipse.mylyn.versions – 1.6.2.v20150217-2249
    org.eclipse.mylyn_feature – 3.14.2.v20150217-2341
    org.eclipse.ocl – 3.1.0.v20110606-1427
    org.eclipse.pde – 3.10.1.v20150204-1700
    org.eclipse.platform – 4.4.2.v20150204-1700
    org.eclipse.rcp – 4.4.2.v20150204-1700
    org.eclipse.wb.core.feature – 1.7.0.r44x201405021445
    org.eclipse.wb.core.java.feature – 1.7.0.r44x201405021448
    org.eclipse.wb.core.ui.feature – 1.7.0.r44x201405021455
    org.eclipse.wb.core.xml.feature – 1.7.0.r44x201405021458
    org.eclipse.wb.doc.user.feature – 1.7.0.r44x201405021506
    org.eclipse.wb.layout.group.feature – 1.7.0.r44x201405021517
    org.eclipse.wb.rcp.SWT_AWT_support – 1.7.0.r44x201405021546
    org.eclipse.wb.rcp.doc.user.feature – 1.7.0.r44x201405030426
    org.eclipse.wb.rcp.feature – 1.7.0.r44x201405021526
    org.eclipse.wb.swing.doc.user.feature – 1.7.0.r44x201405030444
    org.eclipse.wb.swing.feature – 1.7.0.r44x201405021531
    org.eclipse.wb.swt.feature – 1.7.0.r44x201405021519
    org.eclipse.wb.xwt.feature – 1.7.0.r44x201405021548
    org.sonatype.m2e.mavenarchiver.feature – 0.16.0.201401211452-signed-20140310144306
    org.springsource.ide.eclipse.commons – 3.6.2.me201601121429
    org.tigris.subversion.clientadapter.feature – 1.8.6
    org.tigris.subversion.clientadapter.javahl.feature – 1.7.10
    org.tigris.subversion.clientadapter.svnkit.feature – 1.7.9.2
    org.tigris.subversion.subclipse – 1.8.22
    org.tigris.subversion.subclipse.graph.feature – 1.1.1
    org.tigris.subversion.subclipse.mylyn – 3.0.0
    tern-feature – 1.1.0.me201601121429
    tern-jsdt-feature – 1.1.0.me201601121429
    tern-server-nodejs-feature – 1.1.0.me201601121429
    tern.eclipse.ide.tools.feature – 1.1.0.me201601121429

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86_64
    -showsplash
    -launcher
    C:\Users\codeMonkey\AppData\Local\MyEclipse 2015\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Users\codeMonkey\AppData\Local\MyEclipse 2015\plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_3.2.0.v201103301700\eclipse_3215.dll
    -startup
    C:\Users\codeMonkey\AppData\Local\MyEclipse 2015\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    -exitdata
    2894_60
    -install
    C:\Users\codeMonkey\AppData\Local\MyEclipse 2015
    -vm
    C:\Users\codeMonkey\AppData\Local\MyEclipse 2015\binary/com.sun.java.jdk7.win32.x86_64_1.7.0.u45/bin/javaw.exe

    Problem:

    When I run the reverse engineer wizard my POJO’s generate fine, but in my DAO classes the date fields do not appear in the list of static variables or have a findBy… method defined for them.

    My hibernate.reveng.xml defines a table:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE hibernate-reverse-engineering PUBLIC “-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN” “http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd&#8221; >

    <hibernate-reverse-engineering>
    <table name=”TST_GEN_CODES” schema=”MYSCHEMA” class=”test.hibernate.dao.TstGenCodes”>
    <primary-key>
    <generator class=”sequence”>
    <param name=”sequence”>MYSCHEMA.TST_SEQ</param>
    </generator>
    <key-column name=”SGNCD_ID” jdbc-type=”NUMERIC” type=”Integer” />
    </primary-key>
    <column name=”SGNCD_ORDER” jdbc-type=”NUMERIC” type=”Integer”></column>
    <column name=”SGNCD_START_DT” jdbc-type=”DATE” type=”java.sql.Date”></column>
    <column name=”SGNCD_END_DT” jdbc-type=”DATE” type=”java.sql.Date”></column>
    </table>
    </hibernate-reverse-engineering>

    #483421 Reply

    support-swapna
    Moderator

    Steve,

    Sorry that you are experiencing this issue.I see the same behavior at my end. I have filed a report with the dev team to investigate further. We will keep you posted about the fix soon.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #483423 Reply

    stevetague
    Participant

    Okay. Thanks.

    In order to maybe save someone else some time, here are some of the things I have tried while trying to debug this issue:

    Definitions that do not show up:
    Defining the type as java.sql.Timestamp will also cause it to not show in the DAO.
    Defining the type as java.util.Date will also cause it to not show in the DAO.
    Defining the type as java.math.BigDecimal will also cause it to not show in the DAO.

    Definitions that do show up:
    Defining the type as an Integer or a String while keeping jdbc-type=”DATE” will show in the DAO.
    Changing the type to use the full path for String or Integer fields (i.e. java.lang.String) does not cause those fields to not show up in the DAO.

    Additional quirk:

    The generated DAO will include an import for the missing fields. E.g. import java.sql.Date; import java.math.BigDecimal; import java.util.Date;

    #483430 Reply

    support-swapna
    Moderator

    Steve,

    Thank you for sharing your findings with us. I have added them to the bug report.
    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #484455 Reply

    stevetague
    Participant

    Any update on this?

    #484592 Reply

    support-swapna
    Moderator

    Steve,

    The bug is not yet targeted due to other higher priority issues. We will keep you posted about the fix schedule soon.

    Thank you for your patience.

    –Swapna
    MyEclipse Support

    #518685 Reply

    stevetague
    Participant

    Coming up on a year later. Any movement on this bug?

    #518806 Reply

    Brian Fernandes
    Moderator

    Steve,

    Regrettably, no – we haven’t moved on this bug. Given that it’s been so long, I’m scheduling it for re-investigation for the next CI release – 2017 CI 5. One way or another, we will let you know whether a fix for this will be available or if is something we are unlikely to make.

    Apologies for the long wait, and thank you for asking, again.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Hibernate Reverse Engineer DAO Missing Date fields

You must be logged in to post in the forum log in