Return the identifier of the persistent or transient object, or throw
an exception if the instance is "unsaved"
Namespace: NHibernate.EngineAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public static Object GetEntityIdentifierIfNotUnsaved( string entityName, Object entity, ISessionImplementor session ) |
Visual Basic |
---|
Public Shared Function GetEntityIdentifierIfNotUnsaved ( _ entityName As String, _ entity As Object, _ session As ISessionImplementor _ ) As Object |
Visual C++ |
---|
public: static Object^ GetEntityIdentifierIfNotUnsaved( String^ entityName, Object^ entity, ISessionImplementor^ session ) |
Parameters
- entityName
- Type: System..::..String
[Missing <param name="entityName"/> documentation for "M:NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(System.String,System.Object,NHibernate.Engine.ISessionImplementor)"]
- entity
- Type: System..::..Object
[Missing <param name="entity"/> documentation for "M:NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(System.String,System.Object,NHibernate.Engine.ISessionImplementor)"]
- session
- Type: NHibernate.Engine..::..ISessionImplementor
[Missing <param name="session"/> documentation for "M:NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(System.String,System.Object,NHibernate.Engine.ISessionImplementor)"]
Return Value
[Missing <returns> documentation for "M:NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(System.String,System.Object,NHibernate.Engine.ISessionImplementor)"]
Remarks
Used by OneToOneType and ManyToOneType to determine what id value should
be used for an object that may or may not be associated with the session.
This does a "best guess" using any/all info available to use (not just the
EntityEntry).