Hi,
I need to create ARC relationship for Oracle between 3 tables: applicant, people, organisations. Applicant can be company or individual, but nor both. How can it be done in data model using Entity Developer?
Thanks,
Oracle ARC Relationship
Re: Oracle ARC Relationship
Please refer to http://www.devart.com/entitydeveloper/e ... eloper.chm (right click > Properties > Unblock).
Re: Oracle ARC Relationship
I'm sorry, something doesn't work on my computer. Property of what object should I look?
I can add 2 columns to class , set both them as not required. But can be set next rule:
both columns cannot be null or both columns cannot be populated at the same time?
Thanks
I can add 2 columns to class , set both them as not required. But can be set next rule:
both columns cannot be null or both columns cannot be populated at the same time?
Thanks
Re: Oracle ARC Relationship
1. Are you using the Entity Framework (*.edml) model? Or is it Entity Framework Core (*.efml) or NHibernate (*.hbml) or Telerik Data Access (*.daml) or LinqConnect (*.lqml)?
2. Refer to http://www.devart.com/entitydeveloper/e ... eloper.chm (right click > Properties > Unblock), open the ORM Support node > choose your ORM > Concepts > Working with Associations.
If this doesn't help, send us a test model and specify the exact steps we should follow for reproducing the issue.
2. Refer to http://www.devart.com/entitydeveloper/e ... eloper.chm (right click > Properties > Unblock), open the ORM Support node > choose your ORM > Concepts > Working with Associations.
If this doesn't help, send us a test model and specify the exact steps we should follow for reproducing the issue.
Re: Oracle ARC Relationship
Hi,
For example customer table has person and organization columns.
In human words arc constraint is checking one of these columns should be populated , but not both.
These columns both set up as nullable, but have foreign keys to related person and organisation tables. Arc constraint looks like this:
===========
( (ORGANIZATION_ID IS NOT NULL) AND (PERSON_ID IS NULL) )
OR ( (PERSON_ID IS NOT NULL) AND (ORGANIZATION_ID IS NULL) )
===============
Does NHibernate (*.hbml) have ability to picked up these 2 columns in PERSON table and force to create check constraint automatically, if foreign constraints are set up for person and organisation columns to person and organisation tables in person table?
For example customer table has person and organization columns.
In human words arc constraint is checking one of these columns should be populated , but not both.
These columns both set up as nullable, but have foreign keys to related person and organisation tables. Arc constraint looks like this:
===========
( (ORGANIZATION_ID IS NOT NULL) AND (PERSON_ID IS NULL) )
OR ( (PERSON_ID IS NOT NULL) AND (ORGANIZATION_ID IS NULL) )
===============
Does NHibernate (*.hbml) have ability to picked up these 2 columns in PERSON table and force to create check constraint automatically, if foreign constraints are set up for person and organisation columns to person and organisation tables in person table?
Re: Oracle ARC Relationship
Take a look at TPH inheritance (instead of implementing association):gr8user wrote:For example customer table has person and organization columns.
In human words arc constraint is checking one of these columns should be populated , but not both.
- http://www.devart.com/entitydeveloper/e ... eloper.chm > ORM Support > NHibernate > Concepts > Working with Inheritances
- http://www.codeproject.com/Articles/232 ... -Nhibernat
Re: Oracle ARC Relationship
Great! Thank you. I'm going to try this approach.