@@ -246,13 +246,11 @@ class MetaModelGenerator(val outputDir: Path) {
246
246
.mutable(true )
247
247
.delegate(""" ${accessorClass.qualifiedName} (unwrap(), "${feature.originalName} ")""" )
248
248
.build())
249
- if (data.type != PropertyType .STRING ) {
250
- addProperty(PropertySpec .builder(" _raw_" + feature.validName, PropertyType .STRING .asKotlinType())
251
- .addModifiers(KModifier .OVERRIDE )
252
- .mutable(true )
253
- .delegate(""" ${StringPropertyAccessor ::class .qualifiedName} (unwrap(), "${feature.originalName} ")""" )
254
- .build())
255
- }
249
+ addProperty(PropertySpec .builder(" _raw_" + feature.validName, String ::class .asTypeName().copy(nullable = true ))
250
+ .addModifiers(KModifier .OVERRIDE )
251
+ .mutable(true )
252
+ .delegate(""" ${RawPropertyAccessor ::class .qualifiedName} (unwrap(), "${feature.originalName} ")""" )
253
+ .build())
256
254
}
257
255
is ChildLinkData -> {
258
256
// TODO resolve link.type and ensure it exists
@@ -290,11 +288,9 @@ class MetaModelGenerator(val outputDir: Path) {
290
288
addProperty(PropertySpec .builder(feature.validName, data.type.asKotlinType())
291
289
.mutable(true )
292
290
.build())
293
- if (data.type != PropertyType .STRING ) {
294
- addProperty(PropertySpec .builder(" _raw_" + feature.validName, PropertyType .STRING .asKotlinType())
295
- .mutable(true )
296
- .build())
297
- }
291
+ addProperty(PropertySpec .builder(" _raw_" + feature.validName, String ::class .asTypeName().copy(nullable = true ))
292
+ .mutable(true )
293
+ .build())
298
294
}
299
295
is ChildLinkData -> {
300
296
// TODO resolve link.type and ensure it exists
@@ -318,7 +314,7 @@ class MetaModelGenerator(val outputDir: Path) {
318
314
319
315
fun PropertyType.asKotlinType (): TypeName {
320
316
return when (this ) {
321
- PropertyType .STRING -> String ::class .asTypeName().copy(nullable = true )
317
+ PropertyType .STRING -> String ::class .asTypeName()
322
318
PropertyType .BOOLEAN -> Boolean ::class .asTypeName()
323
319
PropertyType .INT -> Int ::class .asTypeName()
324
320
}
0 commit comments