Hello
i cant do a select in the CreateQuery
Code:
Ilist Clients;
clients = session.CreateQuery("from AcceesDonnee.BLL.Client").List(); ;
its works & returns all the columns
but when i try to do this :
Code:
Ilist Clients;
clients = session.CreateQuery("select c.Libelle from AcceesDonnee.BLL.Client c").List(); ;
its doesnt work, it returns a column named lenght
my mapping file for the class Client :
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="AcceesDonnee.BLL.Client, AcceesDonnee" table="Client">
<!-- map the id field -->
<id name="IdClient" column="IdClient" type="String" length="20">
<generator class="assigned" />
</id>
<!-- Map properties I'd like to persist/fetch, assume column = propery name, and type is determined by reflection -->
<property name="Libelle" not-null="false" type="String" length="30"/>
<property name="RaisonSocial" not-null="false" type="String" length="30"/>
<property name="CodePostal" not-null="false" type="String" length="30"/>
<property name="Ville" not-null="false" type="String" length="30"/>
<property name="Pays" not-null="false" type="String" length="30"/>
<property name="Tel" not-null="false" type="String" length="30"/>
<property name="Email" not-null="false" type="String" length="30"/>
<property name="Comentaire" not-null="false" type="String" length="30"/>
<property name="Type" not-null="false" type="String" length="30"/>
<property name="Id_personel" not-null="false" type="String" length="30"/>
<property name="Adresse" not-null="false" type="String" length="30"/>
<bag name="Devis">
<key column="IdClient" />
<one-to-many
class="AcceesDonnee.BLL.ClassDevisClient, AcceesDonnee" />
</bag>
</class>
</hibernate-mapping>
thanks