^ is correct. @Id on getId() means the entity is in property access mode, not field access mode. Choose one or the other, not a mix.