Bonjour,
j'essaye actuellement de créer une table ayant 2 PK avec Nhibernate, mais je ne sais pas comment m'y prendre, voici ce que j'ai essayé :
Ceci ne fonctionne pas.
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 [NHibernate.Mapping.Attributes.Class(Table = "MaTable")] public class MaTable { private string _id1 ; [NHibernate.Mapping.Attributes.Id(Name="Id1")] [NHibernate.Mapping.Attributes.Generator(1, Class = "uuid.hex")] public string Id1 { get { return _id1 ; } set { _id1 = value; } } private string _id2; [NHibernate.Mapping.Attributes.Id(Name="Id2")] [NHibernate.Mapping.Attributes.Generator(1, Class = "uuid.hex")] public virtual string Id2 { get { return _id2; } set { _id2= value; } } }
Est ce que quelqu'un serait comment faire ?
Merci d'avance pour votre aide
Partager