Fixed bug where new beans where not added to the read cache
This commit is contained in:
parent
08b9da1d69
commit
f43b5fdbf4
1 changed files with 5 additions and 2 deletions
|
|
@ -218,8 +218,11 @@ public abstract class DBBean {
|
||||||
|
|
||||||
// Execute the SQL
|
// Execute the SQL
|
||||||
DBConnection.exec(stmt);
|
DBConnection.exec(stmt);
|
||||||
if( id == null )
|
if( id == null ) {
|
||||||
this.id = db.getLastInsertID(stmt);
|
this.id = db.getLastInsertID(stmt);
|
||||||
|
// as this is a new object so add it to the cache
|
||||||
|
DBBeanSQLResultHandler.cacheDBBean(this);
|
||||||
|
}
|
||||||
|
|
||||||
// Save the list, after we get the object id
|
// Save the list, after we get the object id
|
||||||
for(Field field : config.fields){
|
for(Field field : config.fields){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue