[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - @DiscriminatorColumn HELP
ccanonigo
do-not-reply at jboss.com
Thu Oct 12 22:04:59 EDT 2006
based on the trailblazer example i have applied the @discriminatorcolumn in my customerbean to get the marketname which is in marketbean.
but i have another countrybean to be mapped to my customerbean in order to get the country. can i have multiple values for my @discriminatorcolumn? or what is the work around? did i declare this right? need your assistance on how to jointables. thanks.
here is my code snippet:
@Entity
@Table(name="Customer")
@DiscriminatorColumn(name="IDMarket")
@DiscriminatorValue(value="Market")
//getting the marketname from marketbean
@Column(name="IDMarket")
@OneToOne(optional=false)
@JoinColumn(name="IDMarket")
protected MarketBean market;
public MarketBean getMarket( ) { return market; }
public void setMarket(MarketBean _market) { market = _market; }
//getting the countryname from countrybean
@Column(name="IDCountry")
@OneToOne(optional=false)
@JoinColumn(name="IDCountry")
protected CountryBean country;
public CountryBean getCountry() { return country; }
public void setCountry(CountryBean _country) { country = _country; }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978051#3978051
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978051
More information about the jboss-user
mailing list