facebook

Why Byte for bit column after reverse engineering?

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #276173 Reply

    asookazian
    Member

    This message has not been recovered.

    #276208 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #276217 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #276773 Reply

    asookazian
    Member

    @support-nipun wrote:

    Hi asookazian,
    The fact that BIT is not getting converted to boolean is a bug. I have filed it for me dev team. For the time being, you can use page 3 of the Hibernate Reverse Engg wizard to custom map BIT to boolean. You can do this by selecting the bit field in the tree on the left and then entering the JDBC type as BIT and hibernate type as boolean.

    What version of MyEclipse is the fix targeted for? Is it a bug in 6.0 as well?

    The following is a workaround by using the code below in the jpa.reveng.xml during the JPA reverse engineering process:

    <?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" >
    
    <hibernate-reverse-engineering>
    
        <type-mapping>
         <!-- jdbc-type is name fom java.sql.Types -->
         <sql-type jdbc-type="BIT" hibernate-type="Boolean" />      
        </type-mapping>
    
    
    </hibernate-reverse-engineering>
    #276776 Reply

    Riyad Kalla
    Member

    asookazian,
    This has been filed as Nipun mentioned and will be looked at. I don’t know if it will make it into 6.0.1 though.

    Your workaround is exactly the right thing to do in this case, thank you for posting it.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Why Byte for bit column after reverse engineering?

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