Non-data centric Entities

Posts   
 
    
pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 06-Aug-2005 19:30:05   

Is it possible to map some advanced relations to a single entity. Or, is it possible to map the same table to two Enities.

For example, I have a person class that has 10 fields for the address. Can I make an Address Entity that mapps to the address fields, then have that exposed as an Address property on the person object like:

Person.Addrsses.Street

Also, is it possible to create a single entity that is mapped to two tables.

For example, I have an employee entity that is persisted in a table named Person which contains Name, Ssn, etc and a 1:1 related table named Employee (every person is not necessarily an employee) which has employenumber, job, salart, etc, etc. Is it possible to have a single entity class that maps to both tables so I can reference:

Employee.Name Employee.EmployeeNumber

Or, is the product strictly 1 table = 1 entity class ???

Thanks, BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 06-Aug-2005 19:50:47   

pilotboba wrote:

Is it possible to map some advanced relations to a single entity. Or, is it possible to map the same table to two Enities.

For example, I have a person class that has 10 fields for the address. Can I make an Address Entity that mapps to the address fields, then have that exposed as an Address property on the person object like:

Person.Addrsses.Street

No that's currently not possible.

Also, is it possible to create a single entity that is mapped to two tables.

This is coming in the 1.0.2005.1 upgrade, currently in development (beta later this month)

For example, I have an employee entity that is persisted in a table named Person which contains Name, Ssn, etc and a 1:1 related table named Employee (every person is not necessarily an employee) which has employenumber, job, salart, etc, etc. Is it possible to have a single entity class that maps to both tables so I can reference:

Employee.Name Employee.EmployeeNumber

Or, is the product strictly 1 table = 1 entity class ???

At the moment it is, though inheritance (table/view per entity hierarchy (with discriminator column) and table/view per concrete entity (no discriminator column needed)) is added in 1.0.2005.1, a free upgrade for customers. Inheritance mapping for table/view per concrete entity with discriminator column will also be supported, but the discriminator column is ignored, as llblgen pro figures it out by itself. See: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3421 for an impression.

Frans Bouma | Lead developer LLBLGen Pro