>Ie, Foo2.getFoo1Attribute is generated as
>getFoo1().getFoo1Attribute() underneath.
Mike,
Thanks for your reply. I can manage the small incovenience of
(re)re-engineering my schema and editing the objects- every time I reload
Cayenne. I am, however, too lazy for vertical inheritance: This is how I did
my inheritance: excerpt from my *.vm:
#set( $cdo = "CayenneDataObject") // DON'T NEED THIS CLASS IN EJB
@javax.persistence.Entity
@javax.persistence.Table(name = "${entityUtils.subClassName}",
schema="${objEntity.DbEntity.Schema}" )
#if(${entityUtils.subClassName} && ${entityUtils.subClassName} != $cdo)
@javax.persistence.Inheritance(strategy=javax.persistence.InheritanceType.JOINED)
@javax.persistence.DiscriminatorValue("${entityUtils.subClassName}")
@javax.persistence.DiscriminatorColumn(name="${stringUtils.capitalized(${entityUtils.subClassName})_TYPE",
discriminatorType..avax.persistence.DiscriminatorType.STRING)
#elseif(${entityUtils.baseClassName} && ${entityUtils.baseClassName} !=
$cdo)
@javax.persistence.Inheritance(strategy=javax.persistence.InheritanceType.JOINED)
@javax.persistence.DiscriminatorValue("${entityUtils.subClassName}")
@javax.persistence.PrimaryKeyJoinColumn(name="ID",
referencedColumnName="ID")
#end
public class ${entityUtils.subClassName}EJB #if(${entityUtils.baseClassName}
&& ${entityUtils.baseClassName} != $cdo) extends
${entityUtils.baseClassName}EJB #end implements java.io.Serializable{
}
>It's not that straight-forward. Every ObjAttribute has a
>DbAttribute, but every DBAttribute can have zero or one or probably
>even many matching ObjAttributes.
Rather odd, are you saying that a dbAttribute is mapped to zero or more
objAttributes, whereas an objAttribute is mapped to one dbAttribute?
-- View this message in context: http://www.nabble.com/Missing-DbAttribute-tf2008259.html#a5527985 Sent from the Cayenne - User forum at Nabble.com.
This archive was generated by hypermail 2.0.0 : Thu Jul 27 2006 - 15:51:40 EDT