facebook

Blob-Hibernate-DB2 Mapping Error

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

    I am Using Eclipse 3.1.0 Final
    MyEclipse Build: 20050627-4.0-Milestone-2

    The problem is related to the Generation of the Hibernate Descriptor for Tables with Fields of type Blob. The Database is DB2.

    MyEclipse Generates the Descriptor with the following (incorrect) Mapping:

    <property name=”content” column=”CONTENT” type=”blob” not-null=”true” />

    The application compiles OK, but at run-time an Exception es thrown:
    org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of bc.rlquery.hibernate.ReqLog.setContent

    I had found (in Hibernate docs) that the proper mapping for a Blob is binary, which will map to a byte[].

    Then the proper mapping line should be:

    <property name=”content” column=”CONTENT” type=”binary” not-null=”true” />

    Saludos

    Alex

    #233450 Reply

    Riyad Kalla
    Member

    Alex,
    We are aware of some type mismatches and are hopgin to fix all of them in one swoop in 5.0 by introducing our visual hibernate mapper which will allow you to visually design and explicitly set the types and styles of mappings.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Blob-Hibernate-DB2 Mapping Error

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