forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHbmKey.cs
47 lines (41 loc) · 843 Bytes
/
HbmKey.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
using System.Collections.Generic;
using System.Xml.Serialization;
namespace NHibernate.Cfg.MappingSchema
{
public partial class HbmKey: IColumnsMapping
{
#region Implementation of IColumnsMapping
[XmlIgnore]
public IEnumerable<HbmColumn> Columns
{
get { return column ?? AsColumns(); }
}
#endregion
private IEnumerable<HbmColumn> AsColumns()
{
if (string.IsNullOrEmpty(column1))
{
yield break;
}
else
{
yield return new HbmColumn
{
name = column1,
notnull = notnull,
notnullSpecified = notnullSpecified,
unique = unique,
uniqueSpecified = uniqueSpecified,
};
}
}
public bool? IsNullable
{
get { return notnullSpecified ? !notnull : (bool?)null; }
}
public bool? IsUpdatable
{
get { return updateSpecified ? update : (bool?)null; }
}
}
}