Skip to content
Advertisement

Hibernate join columns error: Unable to find column with logical name

I am still pretty much a hibernate newb. I am trying to solve an issue when I start my server:

JavaScript

Entities as below:

JavaScript

SQL Files:

JavaScript

Error happened after adding two new columns stage and organization_id in sep_pr_req_att which is suppose to join to ProcessFlow entity/ spe_workflow table. I am referring to an existing similar table structure on the mapping. I believe I am missing something here. What am I doing wrong?

Advertisement

Answer

You spe_workflow table has a composite primary key, so you should correct your mapping accordingly. There are several possible approaches.

For example you can use @IdClass:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement