Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: Table name from inheritance hierarchy.


Ok, everything works just fine now... I was just a bit confused for a while. A configure the HistoryPolicy on the parents.

 /Magnus Heino


On Thu, Oct 9, 2008 at 4:24 PM, Magnus Heino <magnus@xxxxxxxxx> wrote:

Hum.

What I am trying to do here is add a HistoryPolicy, and create the history table name from the table name in the descriptor.

So maybe the question really is: Is it enough to specify a HistoryPolicy on the parent in a inheritance hierarchy?

 /Magnus Heino



On Thu, Oct 9, 2008 at 4:11 PM, Magnus Heino <magnus@xxxxxxxxx> wrote:


Hi.

How can I access the table name from the org.eclipse.persistence.descriptors.ClassDescriptor in a org.eclipse.persistence.config.DescriptorCustomizer?

My hierarchy looks like this:

@Entity
@Table(name = "BUILDINGFUNCTION")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public abstract class Function extends AbstractEntity {
}

@Entity
@DiscriminatorValue("AGRICULTURAL")
@Historical
@Customizer(AnnotatedCustomizers.class)
public class AgriculturalBuilding extends Function {
}

And it's the in AgriculturalBuilding descriptor that I want to find the BUILDINGFUNCTION table name defined by the parent.

Everything I look at seems to be null at this point... when @Customizer for AgriculturalBuilding is called that is.

 /Magnus Heino



Back to the top