2.4.3.7. @Target

2.4.3.7. @Target

Sometimes, the type guessed by reflection is not the one you want Hibernate to use. This is especially true on components when an interface is used. You can use @Target to by pass the reflection guessing mechanism (very much like the targetEntity attribute available on associations.

    @Embedded
    @Target(OwnerImpl.class)
    public Owner getOwner() {
        return owner;
    }