openxava

DiscussionComment entity has Oracle reserved word as a column causing database generation error


When I try to use the stereotype DISCUSSION with Oracle I get an error because of the entity DiscussionComment column named "comment". Although I'm using the correct dialect for my Oracle version, Hibernate is not quoting DDL as needed. This is a very common problem with simple solution. I just want to apply the solution to OpenXava.

I tried to change the DiscussionComment source in OpenXava project (the one that comes with the OpenXava IDE). I changed the column name but it had no effect.

What and where should I change to alter the mapping of the entity?

The same problem applies to "YourFirstEntity", the demo entity of every project because of the "date" column.


Solution

  • Add the property hibernate.globally_quoted_identifiers to true in your persistence unit in persistence.xml