I have two tables that are considered a single entity in my domain model.
I join them in my IAutoMappingOverride by calling IgnoreProperty on the properties of the joined table and then using Join with a Map for each of the properties.
This configuration works, but I'm lost at attempting a filter on the columns of the joined table. If I call the following:
Session.CreateCriteria<PrimaryEntity>()
.CreateCriteria("ExtraPropertiesTable", JoinType.InnerJoin)
.Add(Expression.Eq("Language", language)) // Column on ExtraPropertiesTable
.List(primaryEntitiesList);
I get the following exception:
QueryException: could not resolve property: ExtraPropertiesTable of: PrimaryEntity
I have also tried DetachedCriteria to no avail.
Any ideas?