Dave Tolls wrote:What errors are you getting?
(Note that the RouteId is supposed to have getters and setters)
Dave Tolls wrote:For the first one, I think this was mentioned earlier.
The class cannot be final as JPA/Hibernate needs to be able to extend the class as part of how it handles persistence.
The next says exactly what the issue is (again, I think this was brought up earlier). You need valid equals and hashcode methods.
The following three imply that the primary keys for those classes are not Long, which is what you are using in the RouteId class.
The fields have to match.
Dave Tolls wrote:Airline and Airport use ints for their ids.
Your RouteId class uses Long.
That's why JPA is complaining about:
The type of the ID mapped by the relationship 'source' does not agree with the primary key class of the target entity.
Stephan van Hulst wrote:Why not:
Stephan van Hulst wrote:I doubt the temporary addition of 50-100 bytes on the stack is that much of a big deal either.
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Devious Experiments for a Truly Passive Greenhouse!https://www.kickstarter.com/projects/paulwheaton/greenhouse-1