macro annotation to mark a trait as a polymorphic persistent component. creates a
companion object for the class that extends PolyPType. if the class already has a companion object, then adds a parent
class PolyPType to the existing companion object. Note that
this will not work if your companion object already extends an abstract
or concrete class, as PolyPType itself is an abstract class. if this
happens, you will see a compiler error such as "class Foo needs to be a trait
to be mixed in".
macro annotation to mark a trait as a polymorphic persistent component. creates a companion object for the class that extends PolyPType. if the class already has a companion object, then adds a parent class
PolyPType
to the existing companion object. Note that this will not work if your companion object already extends an abstract or concrete class, asPolyPType
itself is an abstract class. if this happens, you will see a compiler error such as "class Foo needs to be a trait to be mixed in".