Code inspector is marking some getter functions in my hibernate POJOs with errors when I have a bi-directional one-to-one mapping. According to hibernate documentation I'm supposed to have one side with a <many-to-one unique="true"> element and the other side with a <one-to-one> element. But the code inspector says, "'<many-to-one>' attribute has incorrect opposite '<one-to-one>' 'person'". On the opposite side of the one-to-one relationship the error reads, "'<one-to-one>' attribute has incorrect opposite '<many-to-one>' 'user'". Disregarding that code inspection error, the actual code works perfectly.
I could, of course, disable the inspections. But is there a proper way to specify this relationship for IDEA? I really love the code inspections. Is this a bug in IDEA?