Menu

Having a reserved keyword in a column name results in error when filtering

Alex
2015-09-18
2015-09-21
  • Alex

    Alex - 2015-09-18

    Hello,
    I have the following column name: whereToBuyLink.
    The data is displayed correctly in the list, but when I try to filter any column I get the following exception

    Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: AND near line 1, column 72 [SELECT COUNT(*) from Product e AND e.productPK = :p0]

    When I change to column name in the database for example with wereToBuyLink everything works fine.

    I'm using Java and MySql

     

    Last edit: Alex 2015-09-18
  • Javier Paniza

    Javier Paniza - 2015-09-21

    Hi Alex,

    Add it as a bug, please.

    In the meantime, just change the property name, you can preserve the column name using @Column.


    Help others in this forum as I help you.

     

Log in to post a comment.