File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
src/NHibernate/Mapping/ByCode Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -91,19 +91,41 @@ public class UUIDHexGeneratorDef : IGeneratorDef
91
91
{
92
92
#region Implementation of IGeneratorDef
93
93
94
+ private readonly object param ;
95
+
96
+ public UUIDHexGeneratorDef ( )
97
+ {
98
+ }
99
+
100
+ public UUIDHexGeneratorDef ( string format )
101
+ {
102
+ if ( format == null )
103
+ throw new ArgumentNullException ( "format" ) ;
104
+ param = new { format = format } ;
105
+ }
106
+
107
+ public UUIDHexGeneratorDef ( string format , string separator )
108
+ {
109
+ if ( format == null )
110
+ throw new ArgumentNullException ( "format" ) ;
111
+ if ( separator == null )
112
+ throw new ArgumentNullException ( "separator" ) ;
113
+ param = new { format = format , seperator = separator } ;
114
+ }
115
+
94
116
public string Class
95
117
{
96
118
get { return "uuid.hex" ; }
97
119
}
98
120
99
121
public object Params
100
122
{
101
- get { return null ; }
123
+ get { return param ; }
102
124
}
103
125
104
126
public System . Type DefaultReturnType
105
127
{
106
- get { return typeof ( Guid ) ; }
128
+ get { return typeof ( string ) ; }
107
129
}
108
130
109
131
public bool SupportedAsCollectionElementId
@@ -630,4 +652,4 @@ public bool SupportedAsCollectionElementId
630
652
}
631
653
#endregion
632
654
}
633
- }
655
+ }
You can’t perform that action at this time.
0 commit comments