There is something you must know exists when you encounter problems of the "does not work as expected" kind.

This is
<property name="eclipselink.logging.level" value="FINEST"/>
that you must put in persistence.xml to get spammed in your console and check, for example, that all your entities are recognized.


Oh, and prefer 
@Entity
@Table(name="a_name")

to

@Entity(name="a_name")
if you want to master the table name used. 

Else this is your entity that is renamed and you'll get your queries wrong ;-)