Bonjour,
J'essaye actuellement de charger toutes les données d'un table afin de peupler des listes déroulante. Mais, avec une table qui contient environ 800 entrée, les performances ne sont pas acceptable (entre 20 et 30s par référentiel).
Voici une partie du code :
CommercialName.hbm.xml
CommercialNameTranslation.hbm
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="OPS_OREO.OREO.OPOP.DataModel" assembly="OPS_OREO"> <class name="CommercialName" table="OPOP_CommercialName" lazy="false"> <id name="id"> <column name="Id" /> </id> <bag name="TranslationsList" table="OPOP_CommercialNameTranslation" lazy="false"> <key column="CommercialNameId" /> <one-to-many class="CommercialNameTranslation" /> </bag> </class> </hibernate-mapping>
chaque CommercialName possède plusieurs traductions. Lorsque que je fais un RetrieveAll sur cette table, c'est extrêmement long.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="OPS_OREO.OREO.OPOP.DataModel" assembly="OPS_OREO"> <class name="CommercialNameTranslation" table="OPOP_CommercialNameTranslation" lazy="false"> <composite-id> <key-property name="commercialNameId"> <column name="CommercialNameId" sql-type="integer" not-null="true"/> </key-property> <key-property name="languageId"> <column name="languageId" sql-type="nvarchar" not-null="true"/> </key-property> </composite-id> <property name="label" column="name" /> </class> </hibernate-mapping>
Quelqu'un aurait-il une idée ?
Merci
Partager