Skip to content

Tag: entity

Strange exception when mapping two columns in a table to the same column in another table

There are two entities: and when i create repository with custom query the exception is thrown but if i remove the second referencing column from the query the program starts without exceptions. Moreover, if i use standart query method bookRepository.findAll(): all works fine Books: Book{id=3, name=’Test book’, author=Person{id=1, name=’Person A’}, reviewer=Person{id=2, name=’Person B’}} Book{id=4, name=’Test book’, author=Person{id=2, name=’Person B’}, reviewer=Person{id=1,