Commit 6901eaf
committed
Resolve metadata module TODOs with architectural improvements
CRITICAL BUG FIX:
- Fix DATE field serialization bug in MetaObjectSerializer
- Was serializing entire value object instead of field value
- Changed from context.serialize(vo) to context.serialize(mf.getObject(vo))
- Ensures correct DATE serialization for cross-language compatibility
ARCHITECTURAL IMPROVEMENTS:
- Refactor deleteOnAdd() to use polymorphism instead of instanceof checks
- Add shouldDeleteOnAdd() method to MetaData base class (returns false)
- Override in MetaAttribute to return true (enables replacement behavior)
- Improves extensibility and follows open/closed principle
DOCUMENTATION ENHANCEMENTS:
- Improve shouldUseParentPackage() documentation in BaseMetaDataParser
- Add comprehensive Javadoc explaining package inheritance rules
- Clarify when MetaDataLoader parents don't propagate packages
- Clarify URI validation limitation in URIHelper
- Explain unprefixed classpath resources validated at load time
CODE CLEANUP:
- Remove obsolete LoaderOptions TODO
- Class already supports extension via generic setter pattern
- Fix typo: "somethinf" → removed with DATE serialization fix
All 250 metadata module tests passing.
Aligned with AI-optimized type system for Java/C#/TypeScript cross-language compatibility.
https://claude.ai/code/session_011CUZhLswdQq92FRSrNd3tR1 parent 8429f0e commit 6901eaf
6 files changed
Lines changed: 40 additions & 15 deletions
File tree
- metadata/src/main/java/com/metaobjects
- attr
- io/object/gson
- loader
- parser
- uri
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
930 | 940 | | |
931 | 941 | | |
932 | 942 | | |
933 | 943 | | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
| 944 | + | |
941 | 945 | | |
942 | 946 | | |
943 | 947 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
418 | 429 | | |
419 | | - | |
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments