facebook

Hibernat mapping issue

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

    p0iulii
    Member

    Hi,

    I’m new to using both hibernate and myeclipse and I’ve run into a problem. I had a db table that has some columns which have quoted names and others which don’t. I use myeclipse to generate the hibernate mappings. But when those mappings are generated all column names that are quoted in the db are not quoted in the mapping file , which will make hibernate throw an exception when using those fields. If I manually quote those fields in the mappings file (ie , put their names between ` `) then everything works ok.
    So my question is , is there anyway to force the reverse engeneering process to quote the column names in the generated mapping files ?

    Thanks,

    #264474 Reply

    Riyad Kalla
    Member

    What are the names of these tables such that they need to be quoted? You might consider changing them if you have to quote them.

    #265178 Reply

    p0iulii
    Member

    Thanks for your reply.

    Unfortunately I do not controller the DB , so changing column names is not an option for me. Anything else you can think of ?

    #265211 Reply

    Haris Peco
    Member

    p0iulii,

    MyEclipse support only base quoting : if your name contains blank char or ‘-‘ MyEclipse will add quote automatic.
    There isn’t way that you change this behavior except that you change Reverse Engineering templates.

    I will file PR for your request and I hop ethat we will add this in future releases.

    Thank you for your feedback and sorry for the inconvenience caused.

    Regards,

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hibernat mapping issue

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