1

I'm experiencing strange behaviour between

  • .findAllById(id)
  • .findById(id)

I'm creating a new domain class and then later in the same transaction I'm looking up that same object with a dynamic finder. When using .findAllById(newObjectId) it finds the newly created object but .findById(newObjectId) does not. It's appears .findById() is not searching through uncommitted objects in the transaction?

We recently configured a second datasource which seems to work fine but in doing so we began to experience this behaviour.

On the grails documents I found "The findAll method supports the 2nd level cache".

Does this mean dynamic finder .find doesn't support 2nd level cache?

TimJ
  • 426
  • 4
  • 12

0 Answers0