Bonjour J'ai un GRos probleme avec Nhibernate :
J'ai ces 3 classes :

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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
 public class Transformation 
    {
        private int m_Id;
        private int m_Type;
        private int m_Ind;
        private IList<Action> m_Actions;
        private IList<Condition> m_Conditions;
 
 
 
        public virtual int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }
 
        public virtual int Type
        {
            get { return m_Type; }
            set { m_Type = value; }
        }
 
        public virtual int Ind
        {
            get { return m_Ind; }
            set { m_Ind = value; }
        }
 
        public virtual IList<Action> Actions
        {
            get { return m_Actions; }
            set { m_Actions = value; }
        }
 
        public virtual IList<Condition> Conditions
        {
            get { return m_Conditions; }
            set { m_Conditions = value; }
        }
 
 
}
 
  public class Action
    {
        private int m_Id;
        private Transformation m_Transformation;
        private DateTime? m_ValueDate;
        private String m_Type;
 
        public virtual int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }
 
        public virtual Transformation Transformation
        {
            get { return m_Transformation; }
            set { m_Transformation = value; }
        }
 
        public virtual String Type
        {
            get { return m_Type; }
            set { m_Type = value; }
        }
 
 
        public virtual DateTime? ValueDate
        {
            get { return m_ValueDate; }
            set { m_ValueDate = value; }
        }
 
 
    }
 public class Condition
    {
        private int m_Id;
        private Transformation m_Transformation;
        private int m_Ind;
 
        public virtual int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }
 
        public virtual Transformation Transformation
        {
            get { return m_Transformation; }
            set { m_Transformation = value; }
        }
 
        public virtual int Ind
        {
            get { return m_Ind; }
            set { m_Ind = value; }
        }
 
 
    }
Voici les bags dans le HBM de Transformation :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
<bag name="Actions"      inverse="true"   lazy="true" cascade="all-delete-orphan"   >
		  <key column="ActionId"/>
		  <one-to-many class="Action, Business"/>
</bag>
<bag
	name="Conditions"
               inverse="true"   lazy="true" cascade="all-delete-orphan"  >
		  <key column="ConditionId"/>
		  <one-to-many class="Condition, Business"/>
 
</bag>
Quand sous Nhibernate je récupère la liste des Actions ça marche.
Quand sous Nhibernate je récupère la liste des Condition ça marche.
Mais quand je récupère la liste des Transformations puis des conditions et/ou Actions via : TransformationList.Actions ou TransformationList.Conditions, Nhibernate me renvoie des tableaux vides.
Je ne comprends pas quelqu'un a t'il une idée ?
Quelqu'un a t'il eu le meme probleme ?
Toutes mes autres classes fonctionnent bien sauf celle ci