Commit 6956bbd
committed
Pivot to property-level IsHidden API per review feedback
Addresses feedback on PR #38225:
- roji #1: per-column HIDDEN configuration → IsHidden(bool) on
TemporalPeriodPropertyBuilder + OwnedNavigationTemporalPeriodPropertyBuilder
lets users hide the start and end columns independently.
- roji #2: HIDDEN as a property facet rather than a temporal-specific entity
setting → new SqlServerAnnotationNames.IsHidden plus SqlServerPropertyExtensions
IsHidden / SetIsHidden / GetIsHiddenConfigurationSource (mirroring IsSparse).
PeriodColumnsHidden(bool) is preserved on TemporalTableBuilder as a convenience
that calls SetIsHidden on both period properties.
- Copilot bug: convert-to-temporal path was always emitting
ALTER COLUMN ... ADD HIDDEN. Two new table-level annotations
TemporalPeriodStartHidden / TemporalPeriodEndHidden are emitted by
SqlServerAnnotationProvider.For(ITable) when a period property is configured
visible. BuildTemporalInformationFromMigrationOperation reads them into
TemporalOperationInformation, and EnablePeriod skips the ADD HIDDEN
ALTER COLUMN operations when the column is configured visible.
- New functional test Convert_normal_table_to_temporal_with_visible_period_columns
asserts the ADD HIDDEN operations are omitted.
- Snapshot generator chains .IsHidden(false) onto the period property fluent
call when the column is configured visible.
- Removed entity-level TemporalPeriodColumnsHidden annotation and the
IsTemporalPeriodColumnsHidden / SetIsTemporalPeriodColumnsHidden /
GetIsTemporalPeriodColumnsHiddenConfigurationSource entity extensions.
- Updated baseline.json accordingly.1 parent 76554e0 commit 6956bbd
14 files changed
Lines changed: 336 additions & 133 deletions
File tree
- src/EFCore.SqlServer
- Design/Internal
- Extensions
- Metadata
- Builders
- Internal
- Migrations
- test/EFCore.SqlServer.FunctionalTests
- Migrations
- ModelBuilding
Lines changed: 32 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
379 | 381 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 382 | + | |
| 383 | + | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 387 | + | |
| 388 | + | |
399 | 389 | | |
400 | 390 | | |
401 | 391 | | |
| |||
415 | 405 | | |
416 | 406 | | |
417 | 407 | | |
418 | | - | |
419 | 408 | | |
420 | 409 | | |
421 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
422 | 432 | | |
423 | 433 | | |
424 | 434 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| |||
1128 | 1131 | | |
1129 | 1132 | | |
1130 | 1133 | | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | 1167 | | |
1171 | 1168 | | |
1172 | 1169 | | |
| |||
1191 | 1188 | | |
1192 | 1189 | | |
1193 | 1190 | | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | 1191 | | |
1201 | 1192 | | |
1202 | 1193 | | |
| |||
2533 | 2524 | | |
2534 | 2525 | | |
2535 | 2526 | | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
2536 | 2530 | | |
2537 | 2531 | | |
2538 | 2532 | | |
| |||
2575 | 2569 | | |
2576 | 2570 | | |
2577 | 2571 | | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
2578 | 2575 | | |
2579 | 2576 | | |
2580 | 2577 | | |
| |||
2629 | 2626 | | |
2630 | 2627 | | |
2631 | 2628 | | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2632 | 2635 | | |
2633 | 2636 | | |
2634 | 2637 | | |
| |||
3047 | 3050 | | |
3048 | 3051 | | |
3049 | 3052 | | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
3050 | 3056 | | |
3051 | 3057 | | |
3052 | 3058 | | |
| |||
Lines changed: 0 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 300 | | |
348 | 301 | | |
349 | 302 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1053 | 1101 | | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
59 | 82 | | |
60 | 83 | | |
61 | 84 | | |
| |||
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
0 commit comments