[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Use @AttributeOverride to make attribute @Transient

Greetings,

We have a shared object model, in some instances an object is embedded and others it is referenced. In the embedded case, some of the fields will not be mapped to the database. I would like to do something like this:

<xsd:element name="examCoPay" type="com.vsp.product.model:Copay" >
	<xsd:annotation>
		<xsd:appinfo source="teneo.jpa">
			@Embedded
			@AttributeOverrides({
    			@AttributeOverride(name="amount", column=@Column(name="CO_PAY_1_AMT")),
    			@AttributeOverride(name="appliedTo", @Transient),
    			@AttributeOverride(name="applyToDeductibleInd", @Transient),
    			@AttributeOverride(name="copayFrequency", @Transient),
    			@AttributeOverride(name="copayType", @Transient),
    			@AttributeOverride(name="waiverRule", @Transient)
    		})
		</xsd:appinfo>
	</xsd:annotation>
</xsd:element>

Is there some other way to do this? I am using Teneo 1.0.1 v200809150739, EMF 2.4.0.v200808251517, and eclipse 3.4.2.R342. Thanks.


Tim