开发者

Error in Netbeans(?): attribute column name (length) is a reserved Java Persistence QL keyword

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜