Fix find_or_create_by with custom persistence.

[ fix #3243 ]
Revert "Fix find_or_create_by with custom persistence."

This reverts commit e2e88d45bdc99e6d9808c6b91bdb04673caf56eb.
db:test:prepare now creates all indexes.

[ close #3141 ]