The pertinent code is in EntityPOJOClass:
Code:
public Iterator getAllPropertiesIterator(PersistentClass pc) {
List properties = new ArrayList();
List iterators = new ArrayList();
if ( pc.getSuperclass() == null ) {
// only include identifier for the root class.
if ( pc.hasIdentifierProperty() ) {
properties.add( pc.getIdentifierProperty() );
}
else if ( pc.hasEmbeddedIdentifier() ) {
Component embeddedComponent = (Component) pc.getIdentifier();
iterators.add( embeddedComponent.getPropertyIterator() );
}
/*if(clazz.isVersioned() ) { // version is already in property set
properties.add(clazz.getVersion() );
}*/
}
iterators.add( properties.iterator() );
iterators.add( pc.getPropertyIterator() );
Iterator[] it = (Iterator[]) iterators.toArray( new Iterator[iterators.size()] );
return new SkipBackRefPropertyIterator( new JoinedIterator( it ) );
}