@ManyToOne doesn't do default mapping
If you try
@ManyToOne public Foo getFoo()
you get an error complaining about ambiguous mapping.
According to section 220.127.116.11.2 of the persistence spec, the default is to use a column FOO_ID.
A workaround is to use a @JoinColumn annotation, like this:
There are a number of issues with these mapping defaults. Are these going to be addressed in the near future?