protected internal static bool Exists(Type targetType, object id)
{
EnsureInitialized(targetType);
ISession session = holder.CreateSession(targetType);
try
{
return session.Get(targetType, id) != null;
}
catch(Exception ex)
{
throw new ActiveRecordException("Could not perform Exists for " + targetType.Name + ". Id: " + id, ex);
}
finally
{
holder.ReleaseSession(session);
}
}