From 09c934c7b3e04f306d458568592ff059eb66d2f4 Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Thu, 3 Aug 2023 11:26:15 +0200 Subject: [PATCH] docs: Document SDMLib migration --- docs/sdmlib-migration.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/sdmlib-migration.md diff --git a/docs/sdmlib-migration.md b/docs/sdmlib-migration.md new file mode 100644 index 00000000..4e2a41b0 --- /dev/null +++ b/docs/sdmlib-migration.md @@ -0,0 +1,19 @@ +# Migrating from SDMLib + +SDMLib syntax can be migrated to fulib decorator syntax with a few regular expressions: + +> The examples assume a `ClassModelManager model` parameter. + +```regexp +(\w+).(with|create)Attribute\( +model.haveAttribute($1, + +(\w+).(with|create)UniDirectional\((\w+), "(\w+)", (ONE|MANY)\) +model.associate($1, "$3", $4, $2, null, 0) + +(\w+).(with|create)Bidirectional\((\w+), "(\w+)", (ONE|MANY), "(\w+)", (ONE|MANY)\) +model.associate($1, "$3", $4, $2, "$5", $6) + +\)\.withSuperClazz\( +, +```