Here's my mapping:

public class MyEntityMap : ClassMap<MyEntity>
{
   public MyEntityMap()
   {
      Id(x => x.Id);

      Map(x => x.Type, "SubTypeID").CustomTypeIs<SubType>
().Not.Nullable();

      Map(x => x.DifficultyLevel,
"DifficultyLevelID").CustomTypeIs<Difficulty>().Not.Nullable();

      References(x => x.Category, "CategoryID");
   }
}

Just to clarify, the copy and paste of the sql was misleading in my
first post.  The query is definitely looking at the primary key
("Id").  I've re-pasted the query again to be sure.

SELECT
this_.Id as Id39_0_,
this_.SubTypeID as SubType2_39_0_,
this_.DifficultyLevelID as Difficul3_39_0_,
this_.CategoryID as Category4_39_0_
FROM tbMyEntities
this_
WHERE this_.Id= @p0 and this_.DifficultyLevelID = @p1


On May 27, 10:17 am, Tuna Toksoz <[email protected]> wrote:
> Looks like it correspoinds to Subtype property, so i believe it is mapping
> problem. can you share your mapping for this entity?
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
>
>
> On Wed, May 27, 2009 at 6:11 PM, Action Jackson <[email protected]> wrote:
> > .Add(Restrictions.Eq("SubType", criteria.SubType))- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to