In ecore while creating a dynamic instance, is it possible to create more than one object of the base class?

239 Views Asked by At

School---->students

Like in the above model, Ecore lets me create more than one students in an instance of school. How do i create more than one objects of schools in the same instance?

1

There are 1 best solutions below

0
J. Schneider On

I think the question how you worded it, doesn't make that much sense. But I think the solution you're looking for is just a way of grouping multiple schools together.

If that is the case, I would suggest adding another object called something like SchoolModel which has a composition of the object School. That way if you create one Schoolmodel, you have the freedom of having multiple Schoolobjects with multiple Studentsobjects, which are all "in the same instance" as you put it.