table-per-class

How do I create a table-per-class mapping with fluent nhibernate?

I'm trying to create a mapping similar to the following with fluent nhibernate: <class name="IAccountManager" abstract="true" table="IAccountManager"> <id name="Id"> <generator class="hilo"/> </id> <union-subclass table="DefaultAccountManager" name="DefaultAccountManager"> ...

Table per-subclass strategy when populating a large tree from a database using NHibernate

I am using NHibernate to load a large tree of objects of different types. Mapping is implemented using table-per-subclass strategy. I defined a base class "Node" that has only a few fields (NodeId, ParentId, NodeType) and several subclasses that inherit from Node and add their own fields. The implementation of this approach was straight...

How to specify a mixed table-per-subclass -> table-per-hierarchy in NHibernate HBM?

I'm mixing table mapping strategies to store a class hierarchy via NHibernate 2.1.2. I'm not using Fluent NHibernate. I understand how to map a table-per-hierarchy -> table-per-subclass structure, but not the other way around, as the XML is invalid after adding the discriminator. Here's the HBM extract: <class name="Base1" table="Ba...

Entity framework and associations on TPC base entites.

In my model I have a number of entities that all reference the same table. Is there a way to move this association to a base class using "Table per Concrete class" inheritance? (If so, how?) ...

Java/Hibernate JPA: InheritanceType.TABLE_PER_CLASS and IDs

I'm using Hibernate JPA. Suppose I have these classes: AbstractPerson |--> ConcreteEmployee |--> ConcreteCustomer Is there any way to make the concrete classes have independent IDs? I'm using InheritanceType.TABLE_PER_CLASS. ...

Can you change from a base class to a joined subclass type in nhibernate?

I have document scanning system where several types of documents are scanned. Initially, the document has no information when its scanned, then they get classified and additional information is entered for them in a second step later. So, I have a base class called Document, and subclasses for each type with their respective metadata lik...