Determining if a field is inherited or not

Posts   
 
    
BaileyK83
User
Posts: 29
Joined: 30-Dec-2006
# Posted on: 20-Mar-2007 21:21:38   

How do you determine if a field is received via inheritance or not.

Example:

Object Class //BASE

Person Class Field Name

Employee Class Field Password

How do I determine via an Object Entity that Name for the employee is inherited?

Is this possible

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 21-Mar-2007 08:33:25   

I think this information is not available in the current version, but might be incorporated in the next version (2.1)

Though if you are using SelfServicing you can check the entityFiled.SourceObjectName for the database table name. In the Adapter model you'll need to get the Field PersistenceInfo to get the same information.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 21-Mar-2007 11:29:18   

You can detect this using the ContainingObjectName property of the field object in the Fields collection of the entity. It will return the name (E.g. CustomerEntity) of the entity that contains the field. In your case 'Name' will return "PersonEntity" and Password will return "EmployeeEntity".

The information walaa talks about is the name of the entity the field currently is in. This isn't available at this time, but you want the information that is available simple_smile

Frans Bouma | Lead developer LLBLGen Pro