I have read in other topics relating to this issue to use insertable = false and updatable = false. i have tried it but still getting same error. I have not included any mapping in the InventoryLegVersion class since i don't need to use it. Do i need to do it?
I can't change the names of the fields in the table. It is fixed. I tried to change the name of the columns eg.
@JoinColumn(name = "VersionStartDate1", referencedColumnName = "VersionStartDate", insertable = false, updatable = false)
But i got an error when i ran the application again
Invalid column name 'VersionStartDate1'
org.hibernate.exception.SQLGrammarException: could not initialize a collection: