开发者

Hibernate bug, how to workaround?

I use Hibernate 3.5.3, and Oracle 10g database

I have bean with following relation

@OneToMany
@JoinTable(name="dispenser_accounts",
        joinColumns=@JoinColumn(name="terminal_id"), 
        inverseJoinColumns=@JoinColumn(name="dispenser_section_id"))
@MapKey(name="dispenserNumber")
private Map<Integer, DispenserAccount> activeDispensers = new HashMap<Integer, DispenserAccount>();

When I tr开发者_运维问答ying to fetch data from activeDispensers hibernate generate sql with wrong syntax

SQL Error: 907, SQLState: 42000
ORA-00907: missing right parenthesis

How to workaround this bug?

Thanks!


The answer is probably to overwrite a particular method in the Oracle dialect and fix the problem (hard to say without seeing the SQL).

You could try switching to a different Oracle dialect that may not have the same bug. e.g. Oracle9Dialect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜