Page 1 of 1

How can be Association "ZeroOrOne-To-Many" created?

Posted: Fri 26 Aug 2016 20:19
by gr8user
Hi,

What should be set up to get association "ZeroOrOne-To-May"?

According Help file "In case all foreign key columns of the details table are nullable, the association will have the zero-or-one to many type, which means that the detail class navigation property referring to the master class can be NULL."

Where and how can I achieve that? Whatever I'm trying to do, I get "One-To-Many" association and foreign key columns of the details table are NOT nullable.

I compared 2 examples from your 50 samples - and couldn't find any differences between associations for "one-to-many" and "ZeroOrOne-to-many."

Re: How can be Association "ZeroOrOne-To-Many" created?

Posted: Fri 26 Aug 2016 21:23
by gr8user
Actually I have found way to create foreign key columns to be nullable. But I can see problem here.
In the property tab for foreign key columns in GENERAL part there are no lines for:
Type
Nullable

Type is inherited from primary key of master table, but I cannot see it as property or foreign key column.

I think it is a bug.

There are no different graphic presentation for association itself with nullable foreign key and no displayed property "Nullable" in Property tab for foreign key columns.

In other data modeler applications associations with nullable foreign key columns displayed differently.
It helps a lot when you simply working with diagrams to understand what is going on .

Re: How can be Association "ZeroOrOne-To-Many" created?

Posted: Mon 29 Aug 2016 17:07
by Shalex
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 > One to Many Association.

If this doesn't help, send us a test model and specify the exact steps we should follow for reproducing the issue.

Re: How can be Association "ZeroOrOne-To-Many" created?

Posted: Tue 30 Aug 2016 17:19
by gr8user
Hi Shalex,
Thank you for reply. I was asking about "In the property tab for foreign key columns in GENERAL part there are no lines for: Type, Nullable
Type is inherited from primary key of master table, but I cannot see it as property or foreign key column."
I'm working on NHibernate (*.hbml)

Re: How can be Association "ZeroOrOne-To-Many" created?

Posted: Thu 01 Sep 2016 16:27
by Shalex
gr8user wrote:I was asking about "In the property tab for foreign key columns in GENERAL part there are no lines for: Type, Nullable
Type is inherited from primary key of master table, but I cannot see it as property or foreign key column."
I'm working on NHibernate (*.hbml)
The case is not clear. Please send us a test model and specify the exact steps we should follow for reproducing the issue.