Skip to content

Commit dd3bc41

Browse files
Fix id bug
1 parent e90e73f commit dd3bc41

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/EclipseStoreStorage.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,13 @@ public <T> VersionManager<T> ensureVersionManager(final Class<T> possiblyVersion
418418

419419
public Object getLastId(final Class<?> entityClass)
420420
{
421+
this.ensureEntitiesInRoot();
421422
return this.readWriteLock.read(() -> this.root.getCurrentRootData().getLastId(entityClass));
422423
}
423424

424425
public void setLastId(final Class<?> entityClass, final Object lastId)
425426
{
427+
this.ensureEntitiesInRoot();
426428
this.readWriteLock.write(
427429
() ->
428430
{

0 commit comments

Comments
 (0)