Skip to content

Why use "RootEntityName" compare, not use "EntityName" in NHibernate/Engine /EntityKey.Equals0 #3478

Discussion options

You must be logged in to vote

Because that is the right thing to do.

/// <summary>
/// Returns an object that identifies the space in which identifiers of
/// this entity hierarchy are unique.
/// </summary>
string RootEntityName { get; }

Why should we use the EntityName? In case we have a key from a proxy of a base class, we would no more be able to infer that the key points the same entity than a key of the entity loaded from its concrete type.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hazzik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3471 on February 02, 2024 02:26.