JPA one-to-many unidirectional relationship using a join table?

Can you try defining the field as "BREF" or the same exact case used if you defined it on the attribute mapping, or you can try setting the eclipselink.jpa. Uppercase-column-names persistence property to true. This is likely the issue with "id" when referenced-column-name="bref" is removed, since it is likely the field in the entity defaults to "ID.

Can you try defining the field as "BREF" or the same exact case used if you defined it on the attribute mapping, or you can try setting the eclipselink.jpa. Uppercase-column-names persistence property to true. This is likely the issue with "id" when referenced-column-name="bref" is removed, since it is likely the field in the entity defaults to "ID".

You gave the final tip (if you defined it on the attribute mapping) so I will accept your answer. Added the concrete solution to my question. Thanks!

– K. Claszen Jun 10 at 15:06.

This link should suit you: en.wikibooks.org/wiki/Java_Persistence/O....

The link you provided does not match my problem because it explains the mapping without a join table. Nevertheless the site also provides an join table example which I checked. It leads me to some exceptions which I examine at the moment.

+1 so far for the link. – K. Claszen Jun 8 at 13:00.

In general JPA requires that the foreign keys/join columns reference the primary key/Id of the Entity. But, this should work with EclipseLink, so please include the SQL that is being generated, and if it is wrong, please log a bug. How is the Id of A defined, is it just ID or ID and BREF?

You can use a DescriptorCustomizer to customize the ManyToManyMapping for the relationship and set the correct foreign key field name.

The ID of A is just ID. The generated SQL is valid - but does not use A. BREF as I mentioned.

I have made some modifications and get an exception now. Please have a look at my questions edit section. Will going to google for DescriptorCustomizer now.... – K.

Claszen Jun 8 at 13:29 Your current exception could be a case issue. The default column names are upper case, so try using all upper case in your column names. – James Jun 9 at 13:26.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions