imdg частичный revert c1de35e101
This commit is contained in:
parent
ecab3cbee2
commit
e00969fa4b
1 changed files with 3 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
if (id == null)
|
if (id == null)
|
||||||
return null;
|
return null;
|
||||||
List<CompanyInfo> results = jdbcTemplate.query(
|
List<CompanyInfo> results = jdbcTemplate.query(
|
||||||
"SELECT * FROM COMPANY_INFO WHERE company_id = ?", new Object[]{id}, // todo id=comapny.id? Или сделать отдельный ID?
|
"SELECT * FROM COMPANY_INFO WHERE id = ?", new Object[]{id}, // id=comapny_id
|
||||||
(rs, rowNum) -> {
|
(rs, rowNum) -> {
|
||||||
CompanyInfo companyInfo = new CompanyInfo();
|
CompanyInfo companyInfo = new CompanyInfo();
|
||||||
companyInfo.setId(rs.getObject("Id", Long.class));
|
companyInfo.setId(rs.getObject("Id", Long.class));
|
||||||
|
|
@ -126,7 +126,8 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
if (onceObject == null) {
|
if (onceObject == null) {
|
||||||
log.warn("No row in table COMPANY_INFO where id={}. Create empty ", id);
|
log.warn("No row in table COMPANY_INFO where id={}. Create empty ", id);
|
||||||
onceObject = new CompanyInfo();
|
onceObject = new CompanyInfo();
|
||||||
onceObject.setCompanyId(id); // чтобы не потерять id
|
onceObject.setId(id); // чтобы не потерять id
|
||||||
|
onceObject.setCompanyId(id);
|
||||||
}
|
}
|
||||||
return onceObject;
|
return onceObject;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue