facebook

Hibernate Wizard Bug – PostgreSQL Boolean

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #235006 Reply

    warpelican
    Member

    myEclipse 4.0 M3 under Eclipse 3.0 — Windows

    I used the hibernate “Create hibernate mapping” function on a table that had two PostgreSQL “bool” fields.

    The class generated has two “java.lang.Byte” fields. When you attempt to load a row using the generated class, it will choke with an exception that it could not map “t” into a java.lang.Byte.

    PostgreSQL returns “t” or “f” for its bool fields. java.lang.Byte’s constructor method does not understand this.

    When I change these fields to java.lang.Boolean in the generated class and in the hbm.xml file…all is well.

    Thanks,
    Warpelican

    #235007

    Riyad Kalla
    Member

    Wapelican,
    This is a known issue that we hope to resolve in 5.0 when we release our visual Hibernate mapping editor.

    #267600

    xiaojund
    Member

    @support-rkalla wrote:

    Wapelican,
    This is a known issue that we hope to resolve in 5.0 when we release our visual Hibernate mapping editor.

    I am using release 5.1.0GA, and it still has the same problem. Postgresql Boolean mapped to Java Byte. I am losing battle to compete with Ruby on Rails because of this problem for what ORM to use. Because this error will prevent us from frequently adapt to constantly changed Database during project initial startup phase. Hope this simple (which I thought) to be solved so that Java won’t lost to Ruby. Rugy on Rails made a graceful integration between app and db. If myEclipse can streamline this autogeneration of mapping file and corresponding classes without error, that will greatly helping Java developers. Thanks for your attention

    #267660

    Haris Peco
    Member

    xiaojund,

    Could you try map JDBC type BOOLEAN to Hibernate type boolean (or java.lang.Boolean) on page 2 of Hibernate Reverse Engineering wizard

    Regards,

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hibernate Wizard Bug – PostgreSQL Boolean

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