I have a column named length
in an Oracle database. I cannot change the column name. When I use the @Column(name="length")
in a JPA Entity I get the following error:
attribute column name (length) is a reserved Java Persistence QL keyword
I am using the Netbeans 6.8 I开发者_StackOverflow中文版DE.
Any ideas on this?
Thanks
If I'm not mistaken, escaping the column name in double quotes should work.
@Column(name="\"length\"")
private int length;
精彩评论