Openbravo Issue Tracking System - Retail Modules  | |||||||||||||||||||||
| View Issue Details | |||||||||||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||||
| 0033709 | Retail Modules | Web POS | public | 2016-08-12 18:07 | 2016-08-29 09:59 | ||||||||||||||||
| Reporter | shuehner | ||||||||||||||||||||
| Assigned To | shuehner | ||||||||||||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||||||||||
| Status | closed | Resolution | fixed | ||||||||||||||||||
| Platform | OS | 5 | OS Version | ||||||||||||||||||
| Product Version | |||||||||||||||||||||
| Target Version | Fixed in Version | RR16Q4 | |||||||||||||||||||
| Merge Request Status | |||||||||||||||||||||
| Review Assigned To | mtaal | ||||||||||||||||||||
| OBNetwork customer | No | ||||||||||||||||||||
| Support ticket | |||||||||||||||||||||
| Regression level | |||||||||||||||||||||
| Regression date | |||||||||||||||||||||
| Regression introduced in release | |||||||||||||||||||||
| Regression introduced by commit | |||||||||||||||||||||
| Triggers an Emergency Pack | No | ||||||||||||||||||||
| Summary | 0033709: Double query for posterminal in POSUtil.getLastDocumentNumber*ForPos | ||||||||||||||||||||
| Description | Those 3 functions in POSUtil do double query to OBPOS_Application each. getLastDocumentNumberForPOS getLastDocumentNumberQuotationForPOS getLastDocumentNumberReturnForPOS OBCriteria<OBPOSApplications> termCrit = OBDal.getInstance().createCriteria( OBPOSApplications.class); termCrit.add(Restrictions.eq(OBPOSApplications.PROPERTY_SEARCHKEY, searchKey)); - if (termCrit.count() != 1) { The code did explicit count() <> 1 check. However as filter is for value field which has a unique constraint the case of >1 cannot happen. So the count+list can be simplified to a simple .uniqueResult() followed by a != null check.  | ||||||||||||||||||||
| Steps To Reproduce | 1.) Login into WebPOS 2.) Review queries done to obpos_applications coming from the above locations. Notice .count() for each query followed by a select *  | ||||||||||||||||||||
| Proposed Solution | |||||||||||||||||||||
| Additional Information | |||||||||||||||||||||
| Tags | Performance | ||||||||||||||||||||
| Relationships | 
  | ||||||||||||||||||||
| Attached Files | |||||||||||||||||||||
| Issue History | |||||||||||||||||||||
| Date Modified | Username | Field | Change | ||||||||||||||||||
| 2016-08-12 18:07 | shuehner | New Issue | |||||||||||||||||||
| 2016-08-12 18:07 | shuehner | Assigned To | => Retail | ||||||||||||||||||
| 2016-08-12 18:07 | shuehner | OBNetwork customer | => No | ||||||||||||||||||
| 2016-08-12 18:07 | shuehner | Triggers an Emergency Pack | => No | ||||||||||||||||||
| 2016-08-12 18:09 | shuehner | Assigned To | Retail => shuehner | ||||||||||||||||||
| 2016-08-12 18:10 | shuehner | Tag Attached: Performance | |||||||||||||||||||
| 2016-08-23 14:45 | shuehner | Relationship added | related to 0033767 | ||||||||||||||||||
| 2016-08-23 15:40 | hgbot | Checkin | |||||||||||||||||||
| 2016-08-23 15:40 | hgbot | Note Added: 0089309 | |||||||||||||||||||
| 2016-08-23 15:40 | hgbot | Status | new => resolved | ||||||||||||||||||
| 2016-08-23 15:40 | hgbot | Resolution | open => fixed | ||||||||||||||||||
| 2016-08-23 15:40 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f45d8a4e733bc770810df0ff283698c746f61970 [^] | ||||||||||||||||||
| 2016-08-23 15:41 | shuehner | Review Assigned To | => mtaal | ||||||||||||||||||
| 2016-08-29 09:59 | mtaal | Note Added: 0089484 | |||||||||||||||||||
| 2016-08-29 09:59 | mtaal | Status | resolved => closed | ||||||||||||||||||
| 2016-08-29 09:59 | mtaal | Fixed in Version | => RR16Q4 | ||||||||||||||||||
| 2017-09-19 18:50 | markmm82 | Relationship added | blocks 0036898 | ||||||||||||||||||
| Notes | |||||
| 
		 | 
|||||
		
  | 
	
		
  | 
||||
| 
		 | 
|||||
		
  | 
	
		
  | 
||||