forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA.cs
58 lines (49 loc) · 813 Bytes
/
A.cs
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
using System;
using System.Collections.Generic;
namespace NHibernate.Test.Cascade
{
public class A
{
private long id;
private string data;
private ISet<H> hs; // A 1 - * H
private G g; // A 1 - 1 G
public A()
{
hs = new HashSet<H>();
}
public A(string data) : this()
{
this.data = data;
}
public virtual long Id
{
get { return id; }
set { id = value; }
}
public virtual string Data
{
get { return data; }
set { data = value; }
}
public virtual G G
{
get { return g; }
set { g = value; }
}
public virtual ISet<H> Hs
{
get { return hs; }
set { hs = value; }
}
public virtual void AddH(H h)
{
hs.Add(h);
h.A = this;
}
public override string ToString()
{
return "A[" + id + ", " + data + "]";
}
}
}