DATAJDBC-400 - Deprecated Identifier for those events that also have an entity.

Retrieval of the Identifier has been shown to cost significant performance.

Original pull request: #164.
This commit is contained in:
Jens Schauder
2019-07-26 11:59:28 +02:00
committed by Mark Paluch
parent 2289195e8a
commit af3b9f8adb
2 changed files with 8 additions and 6 deletions

View File

@@ -39,11 +39,13 @@ public class RelationalEventWithId extends SimpleRelationalEvent implements With
this.id = id;
}
/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.core.mapping.event.JdbcEvent#getId()
/**
* Events with an identifier will always return a {@link Specified} one.
*
* @deprecated obtain the id from the entity instead.
*/
@Override
@Deprecated
public Specified getId() {
return id;
}

View File

@@ -43,11 +43,11 @@ class SimpleRelationalEvent extends ApplicationEvent implements RelationalEvent
this.change = change;
}
/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.core.mapping.event.JdbcEvent#getId()
/**
* @deprecated obtain the id from the entity instead.
*/
@Override
@Deprecated
public Identifier getId() {
return (Identifier) getSource();
}