hibernate h2 embeddable list expected “identifier”

前端 未结 7 1876
别那么骄傲
别那么骄傲 2021-01-17 16:31

I\'m trying to associate a list of function (whom Embeddable) within my Employee Entity and H2 seems unhappy with this saying that it expected an \"identifier\"

相关标签:
7条回答
  • 2021-01-17 17:06

    Turns out I was being dumb and named a column "Order". Wonder why H2 wasn't happy :upside_down:

    Changed the variable name to something else and it worked!

    0 讨论(0)
  • 2021-01-17 17:09

    try to put the ; before the " and test ?

    0 讨论(0)
  • 2021-01-17 17:11

    I had the same problem with Spring and H2 database for tests, My entity had the field name "interval", I renamed to "inter" and resolved the problem.

    So, these errors happen due to a sql reserved names in entities.

    0 讨论(0)
  • 2021-01-17 17:15

    Got same issue with Order as entity. Changed table name to "orderz" and goes on.

    0 讨论(0)
  • 2021-01-17 17:19

    in my case problem cause was incorrect syntax in insert statement problem :

    insert into 'table name missing' (column names...) values(values...);
    

    after adding table name

    fix:

    insert into 'table name specified' (column names...) values(values...);
    

    some times trivial mistakes are hard to spot :)

    0 讨论(0)
  • 2021-01-17 17:20

    I have the same problem while naming the fields: private String to and private String from , changed to ex. dayTo , dayFrom , and it worked.

    0 讨论(0)
提交回复
热议问题