facebook

Problem with datatype of generated Java class

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

    meuser
    Member

    Hello,

    I’m new to both Hibernate and MyEclipse.
    At the moment I got some generated Java class, however, some datatype in generated class does not compatible with my database (PostgreSql). As the result, I cannot test generated class by using Hibernate IDE.
    One concrete example is that MyEclipse generates Java.lang.Byte for boolean type of PostgreSql. Is there any way to overcome this problem?

    Thanks in advance,

    #219228 Reply

    support-jeff
    Member

    Currently there is not a work-around except to manually modify the generated mapping and java class files. Be warned that if you attempt to re-generate mappings and classes from the database your changes will be lost. Alternately, you could add wrapper methods in the generated subclass (which is not regenerated further after the first time) to turn the bytes into booleans. Future enhancements to the tooling will support more flexibility in the types used to map to the db.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problem with datatype of generated Java class

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