This will give you the physical column names. An entity in NHibernate will
only have, at most, a single identifier property.
String entityName = (sessionFactory as
ISessionFactoryImplementor).TryGetGuessEntityName(entityType);
AbstractEntityPersister persister = (sessionFactory as
ISessionFactoryImplementor).TryGetEntityPersister(entityName) as
AbstractEntityPersister;
if (persister != null)
{
return (persister.IdentifierColumnNames);
}
RP
On Tuesday, May 28, 2013 3:48:18 PM UTC+1, Sean Farrow wrote:
>
> Hi,
>
>
>
> I’ve obtained the class meta data from the session factory. What I’m now
> after is the number and names of the primary key properties whether this be
> composite keys or otherwise.
>
> I can see a GetIdentifier method and others referring to natural id’s can
> someone give me some pointers please!
>
> Cheers
>
> Sean.
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.