What is the access order of PersistentProperty
s when iterating over them? Is it the same as in the definition of PersistentEntity
, or is it random? I couldn't find any information about this in the Javadoc of Spring Data.
Fundamentally, the ultimate source of the properties created is Java's Class.getDeclaredFields()
which doesn't guarantee any particular order. The high-level property creation algorithm can be found in AbstractMappingContext
(ReflectionUtils.doWithFields(…)
making the connection).
I've filed and fixed a ticket in Spring Data Commons to clarify this in the Javadoc.