I am new to Java EE (and to Netbeans). I have am trying to automatically generate entity classes from my mysql database… For simple relationships it works, but for the following it always fails:

i get the following error:
Internal Exception: Exception [EclipseLink-7220] (Eclipse Persistence Services – 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The @JoinColumns on the annotated element [field tblExpandituresTranx] from the entity class [class entities.restaurant.TblContents] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referencedColumnName elements must be specified in each such @JoinColumn.. Please see server.log for more details.
I think… I have some error in my database or perhaps EclipseLink JPA tool is kaput!
please help!
I solved the problem myself…
Apparently JPA has a problem with multiple primary keys in bridge tables. So, instead of having foreign keys as primaries I just converted them to unique indexed and everything worked just fine!! wuhu!!