.net - Limiting fields in Select statement generated by Linq to Castle ActiveRecord -


The problem I am using ActiveRecord and LinqToActiveRecord to query my database is that my LINQ expression generated SQL statement always tries to select all the potential areas, in the included tables, when it is not needed For example, I have this database table:

  Table: MasterTable ID (child) child ID (int) & lt; - The child references a record in the table table: Balletable ID (int) childarch (varchar)  

Now I want to query all the master records of which the child name in reference is " Tizan ":

  var myList = (from Master in MasterTable). Planet where master.Child.ChildName ==" Tijn "select Master) .Oolist ();  

The generated SQL statement tries to select not only all the master areas, but also the included hair areas! When I try the same using HQL:

  Master from MasterTable Master select where master.Child.ChildName = 'Tijn'  

generated SQL statement Only includes Master Field, as I wanted.

So, to be less: Which field is selected in LINQtoActiveRecord / LINQtoNHibernate, how can I limit the table? Some sort of 'launch' or expanded 'selection' method?


Comments