tags:

views:

62

answers:

1

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 IDE.

Any ideas on this?

Thanks

A: 

If I'm not mistaken, escaping the column name in double quotes should work.

@Column(name="\"length\"")
private int length;
Henning