I see, this is the first time I try implementing foreign keys so I misused the annotations. I removed the annotations and everything works just fine now. Thanks.