3

I was trying to understand the concept of MixinTypes in JCR, What i red "Mixin node types usually specify additional properties or child nodes related to a capability being added to the node" but it seems some unclear, I am looking for simple defination through which i can understand. Like we have node type cq:page and it has supertype mix:created which is of mixin type. What if the case i remove mixin type property from mix:created.

Or any other example. Thanks

Vivek Dhiman
  • 1,967
  • 6
  • 46
  • 82
  • 1
    possible duplicate of [What is difference between jcr:primaryType and jcr:mixinTypes?](http://stackoverflow.com/questions/23079828/what-is-difference-between-jcrprimarytype-and-jcrmixintypes) – Bertrand Delacretaz Dec 11 '14 at 10:21
  • Hi, Just had a view on this, mixins are somelike interface where we can have multiple mixin types inside one primary type. In that case we are inheriting multiple properties of mixins inside primary type. So what i the case i create 2 node of primarytypes & 3rd primarytype will inherit last two to inherit their properties. Just want to get example where is mandatory to apply only mixins inside the primary type. Thanks – Vivek Dhiman Dec 12 '14 at 07:19

1 Answers1

3

If you read the documentation it should be clear.

"Every node has one declared primary node type and zero or more mixin node types. Primary node types are typically used to defined the core characteristics of a node, while mixin node types are used to add additional characteristics often related to specific repository functions or to metadata."

One way of looking at is not all JCR implementations have all the features so not all the mixins would work. Some mixin's expose hidden properties. Jackrabbit has a unique identifier for every node (jcr:uuid) but if you tried to list the nodes properties it would not appear, unless you added the mix:referenceable mixin. Other mixin's tell the JCR which features to use, eg. versioning. If your JCR supports it you must add mix:versionable or mix:simpleVersionable to tell it which nodes to version.

TedTrippin
  • 3,525
  • 5
  • 28
  • 46
  • Could you please throw some light on this - https://stackoverflow.com/questions/46253975/node-identifier-of-copied-node-in-jackrabbit-not-found-while-deleting – Gandhi Sep 17 '17 at 11:52