@ManyToOne doesn't do default mapping
If you try
@ManyToOne public Foo getFoo()
you get an error complaining about ambiguous mapping.
According to section 184.108.40.206.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?