Details
Description
PersistenceBrokerAware#afterLookup(...) is called before the object was completely materialized. The "normal" fields are materialized, but all references still 'null' when the afterLookupEvent is fired. The query/reference prefetching in class QueryReferenceBroker is responsible because it seems that this class batch the retrieve of references.
Test case to reproduce this issue is PBListenerTest#testStoreAndQuery().