Hi Everyone,
Is there a way to prevent a select from producing the results of all of the subclasses of a class? I only need the data from the super class.
Just for some background info, here is a small snipped of the super class. What I’m trying to access are names, postalAddresses, telephoneNumbers, and emailAddresses. This class is the parent of several subclasses.
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class ConstituentEntity implements Constituent {
@OneToMany(mappedBy = "constituent", targetEntity = NameEntity.class, fetch = FetchType.EAGER)
@XmlTransient
protected Set<Name> names;
@OneToMany(mappedBy = "constituent", targetEntity = PostalAddressEntity.class)
protected List<PostalAddress> postalAddresses;
@OneToMany(mappedBy = "constituent", targetEntity = TelephoneNumberEntity.class)
protected List<TelephoneNumber> telephoneNumbers;
@OneToMany(mappedBy = "constituent", targetEntity = EmailAddressEntity.class)
protected List<EmailAddress> emailAddresses;
Thanks,
Dan