facebook

Hibernate Mapping generation map NUMBER(1) to boolean

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

    alvinantony
    Member

    Hallo friends,

    I am trying to create hibernate mapping file for a table from database browser perspective.

    as default creates the java class and mapping file with Long type for a NUMBER but i need a boolean type if the column type is NUMBER(1)

    i tried the following in customized Type Mappings:

    JDBC Type: NUMBER Hibernate Type:boolean length:nil or 1 scale:0 and precision: nil or 1

    but no success 😉

    any help would be great

    Thanks in advance.

    Alvin

    #253479 Reply

    Brian Fernandes
    Moderator

    Alvin,

    There is a bug because of which some custom settings are not respected. This will be fixed in the next version of MyEclipse.

    For now, can you use the specific settings on page 3 of the RE wizard? Drill down to your column in the tree and in the Hibernate Type field, enter the Type you want for that particular column.

    Sorry for the inconvenince caused, let us know if you require further assistance,
    Brian.

    #253936 Reply

    Brian Fernandes
    Moderator

    Alvin,

    I apologize for not following this up in detail earlier and confused your problem with another issue we had in our code base.

    NUMBER is not a standard JDBC type, what you can use instead is DECIMAL, with a length of 1 and an empty scale and precision field.
    As always, you can still use the detailed settings on page 3 to specify the type mapping.

    Let us know if you require further assistance.
    Best,
    Brian.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Hibernate Mapping generation map NUMBER(1) to boolean

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