View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002176 | OXID eShop (all versions) | 4. ------ eShop Core ------- | public | 2010-10-26 12:16 | 2012-12-10 13:42 |
Reporter | dominik_ziegler | Assigned To | |||
Priority | immediate | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.4.3 revision 30016 | ||||
Fixed in Version | 4.4.5 revision 31315 | ||||
Summary | 0002176: oxBase::exists() fails on custom primary key column names | ||||
Description | In the method exists() you have the following SQL query: $sSelect= "select oxid from {$this->getViewName()} where {$this->_sExistKey} = ".$oDB->quote($sOXID); This query searches for "oxid" and not for the specific "exist key" which affects the check result (it is always false of course). Please fix this query as soon as possible! | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
In this case (seems like very custom case) you should create custom class (which extends oxbase/oxi18n object) or module if you need to extend some default object functionality for your object/table combination with correct "$this->_sExistKey" field definition. |
|
I don't get that. I think the query could changed from $sSelect= "select oxid from {$this->getViewName()} where {$this->_sExistKey} = ".$oDB->quote($sOXID); to $sSelect= "select {$this->_sExistKey} from {$this->getViewName()} where {$this->_sExistKey} = ".$oDB->quote($sOXID); without any inconvenience? |
|
misunderstood, yes, you are right! Thnx! |