c# - NHibernate Get Data from composite key with reference key does not work -


i have class

public class clsmovimientosmodel {     public virtual datetime fecha_etmv { get; set; }     public virtual clsequipotransportemodel equipt_etmv { get; set; }     public virtual string tmov_etmv { get; set; }     public virtual string observ_etmv { get; set; }     public virtual string usr_etmv { get; set; } } 

and map class

public class clsmovimientosmap : classmap<clsmovimientosmodel> {     public clsmovimientosmap()     {         table("et_movimientos");         compositeid()             .keyproperty(p => p.fecha_etmv, "fecha_etmv")             .keyreference(p => p.equipt_etmv, "id_etmv");         map(m => m.tipo, "tipo_etmv").length(2).not.nullable();         map(m => m.tmov_etmv, "tmov_etmv").length(1).not.nullable();         map(m => m.observ_etmv, "observ_etmv").length(2000).not.nullable();         map(m => m.usr_etmv, "usr_etmv").length(10).not.nullable();     } } 

equipt_etmv property class when try complete list clsmovimientos class.

using (var session = clsconnhelper.opensession()) {     var obj = (from o in session.queryover<clsmovimiento>().list()                select o);     list<t> ls = obj.tolist();     return ls; } 

the var ls empty, no error. why?


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -