core-java icon indicating copy to clipboard operation
core-java copied to clipboard

Consider making `ModelClass`es using `ClassValue`

Open alexander-yevsyukov opened this issue 5 years ago • 2 comments

... instead of being an instance reference in each entity.

alexander-yevsyukov avatar May 22 '19 16:05 alexander-yevsyukov

As a probably better alternative, we can generate the code for ModelClass-es so that they contain:

  • Dispatching information in the form of direct calls to instance methods of the corresponding entity.
  • The name of the Bounded Context so that we don't seek for it in the package structure.

The class can be named after the pattern EntityClassMC and placed into the generated/spine into the same package with the entity class. That way the class can be loaded via the name convention.

alexander-yevsyukov avatar Jul 15 '19 21:07 alexander-yevsyukov

@armiol, FYI.

alexander-yevsyukov avatar Jul 15 '19 21:07 alexander-yevsyukov