Skip to content
Snippets Groups Projects
Commit 54529b42 authored by Chrissi's avatar Chrissi
Browse files

remove bug because of to late setting the parent relation in the roles in the views

parent 082c98c0
No related branches found
No related tags found
No related merge requests found
......@@ -400,6 +400,6 @@ class SClass(_name: String,
state.map(_.hashCode()).foldLeft(0)((a, b) => 31 * a + b)
}
override def toString: String = s"SC: $getName($sPackage, ${attributes.map(_.getName).mkString(", ")}, $isAbstract, $isInterface)"
override def toString: String = s"SC: $getName($sPackage, ${attributes.map(_.getName).mkString(", ")} ## ${getOnlyDeepAttributes.map(_.getName).mkString(", ")} || $isAbstract, $isInterface)"
}
......@@ -39,6 +39,7 @@ class QueryGeneratingVisitor extends SModelVisitor {
viewCompartment.addInternalClass(internalClass)
})
//TODO: can be necessary to add all parents in one loop first
//Now fill all natural internal roles with functionality
newInternalRoles.foreach(inner => {
val cls = inner.sumSource
......
......@@ -32,7 +32,7 @@ class ViewGeneratingVisitor extends SModelVisitor {
viewCompartment.addInternalClass(internalClass)
})
//Now fill all natural internal roles with functionality
//Now add the parents to all natural internal roles first
newInternalRoles.foreach(inner => {
val cls = inner.sumSource
//set inheritance to abstract view role
......@@ -46,6 +46,10 @@ class ViewGeneratingVisitor extends SModelVisitor {
inner.addParent(existing.get)
}
})
})
//add now the messages because they can depend on the parents
newInternalRoles.foreach(inner => {
//add initialize method if necessary
if (!inner.isAbstract && !inner.isInterface) {
inner.addMethod(ViewMethods.getIsRelationalMethod(false))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment