0

What is the access order of PersistentPropertys 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.

Oliver Drotbohm
  • 80,157
  • 18
  • 225
  • 211
akshay
  • 207
  • 1
  • 2
  • 7

1 Answers1

1

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.

Oliver Drotbohm
  • 80,157
  • 18
  • 225
  • 211