I'm just starting with Hibernate annotations and JPA - everthing works great!
I really like that I don't need any database specific settings (e.g. table and column names). I don't want to keep them in my Java sources and I'm hesitant to use additional XML configurations.
But using indexed lists (not bags) spoils this impression:
Code:
@OneToMany(cascade = CascadeType.ALL)
@IndexColumn(name = "INDEX")
private List<Foo> children;
Why doesn't the Hibernate offer a default value for the 'name' element?
Won't it be called 'index' in most cases anyway - at least if your database doesn't grump on a homonymous keyword.
Couldn't Hibernate be smarter than I am (it probably is already ;) and default to a suitable index column name?
Sven