@@ -45,11 +45,14 @@ protected override void RegisterTypes(DomainConfiguration configuration)
45
45
configuration . Types . Register ( typeof ( DateTimeEntity ) ) ;
46
46
configuration . Types . Register ( typeof ( MillisecondDateTimeEntity ) ) ;
47
47
configuration . Types . Register ( typeof ( NullableDateTimeEntity ) ) ;
48
- configuration . Types . Register ( typeof ( MinMaxDateTimeEntity ) ) ;
48
+
49
49
configuration . Types . Register ( typeof ( AllPossiblePartsEntity ) ) ;
50
50
configuration . Types . Register ( typeof ( DateOnlyEntity ) ) ;
51
51
configuration . Types . Register ( typeof ( SingleDateOnlyEntity ) ) ;
52
- configuration . Types . Register ( typeof ( MinMaxDateOnlyEntity ) ) ;
52
+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . PostgreSql ) ) {
53
+ configuration . Types . Register ( typeof ( MinMaxDateOnlyEntity ) ) ;
54
+ configuration . Types . Register ( typeof ( MinMaxDateTimeEntity ) ) ;
55
+ }
53
56
configuration . Types . Register ( typeof ( TimeOnlyEntity ) ) ;
54
57
configuration . Types . Register ( typeof ( SingleTimeOnlyEntity ) ) ;
55
58
}
@@ -201,8 +204,11 @@ protected override void PopulateEntities(Session session)
201
204
202
205
_ = AllPossiblePartsEntity . FromDateTime ( session , FirstMillisecondDateTime , 321 ) ;
203
206
204
- _ = new MinMaxDateOnlyEntity ( session ) { MinValue = DateOnly . MinValue , MaxValue = DateOnly . MaxValue } ;
205
- _ = new MinMaxDateTimeEntity ( session ) { MinValue = DateTime . MinValue , MaxValue = DateTime . MaxValue } ;
207
+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . PostgreSql ) ) {
208
+ // values are out of range
209
+ _ = new MinMaxDateOnlyEntity ( session ) { MinValue = DateOnly . MinValue , MaxValue = DateOnly . MaxValue } ;
210
+ _ = new MinMaxDateTimeEntity ( session ) { MinValue = DateTime . MinValue , MaxValue = DateTime . MaxValue } ;
211
+ }
206
212
}
207
213
}
208
214
}
0 commit comments