In {{ OgmEntityEntryState }} method {{ getStateFor }} , there's an attempt to retrieve the object from the persistence context. If the object is not found in the persistence context, then an exception is throw stating " 'entityEntry' must not be null ". This is not very descriptive and could easily be improved by passing something like "entityEntry: " + object as the "name" parameter to {{ Contracts.assertNotNull }} . In this way the object's {{ toString }} method will be called and appended to the exception output, allowing for easy identifcation identification of the object which is not in the persistence context. |
|