macro annotation to generate a inner object props for your PType for
you. Recursive members of the type P in PType[P] are mirrored in a
structure of nested objects with type Prop[P, A](path) for appropriate
values A and path.
- case classes are traversed according to the parameters of their primary
constructor
- collection properties (Options, Sets, and Lists) are skipped
- traits are traversed according to the abstract public vals they define.
the traits themselves, however, are not mirrored as a Prop[P, A]
NOTE: this traversal process will collect all valid properties for your PType.
but be aware that the traversal can collect properties that are not actually
valid. for example, it will freely traverse case class elements that appear
to be persistent components, but are not included in your DomainModel. it
will also traverse persistent components that are otherwise illegal, such as
those whose primary constructor has more than one parameter list. in all
these cases, the property created by this macro will cause an exception to be
thrown on domain model construction. but all these cases, which represent a
malformed domain model, would have otherwise produced exceptions on domain model
construction.
macro annotation to generate a inner object
props
for yourPType
for you. Recursive members of the typeP
inPType[P]
are mirrored in a structure of nested objects with typeProp[P, A](path)
for appropriate valuesA
andpath
.- case classes are traversed according to the parameters of their primary constructor - collection properties (
Options
,Sets
, andLists
) are skipped - traits are traversed according to the abstract public vals they define. the traits themselves, however, are not mirrored as aProp[P, A]
NOTE: this traversal process will collect all valid properties for your
PType
. but be aware that the traversal can collect properties that are not actually valid. for example, it will freely traverse case class elements that appear to be persistent components, but are not included in your DomainModel. it will also traverse persistent components that are otherwise illegal, such as those whose primary constructor has more than one parameter list. in all these cases, the property created by this macro will cause an exception to be thrown on domain model construction. but all these cases, which represent a malformed domain model, would have otherwise produced exceptions on domain model construction.