id not present in _postSave

megabosx

Active member
I have added an override to the _postSave() method of the datawriter of my item. The problem i have is that at this stage it seems that the item id is not available yet, iv'e defined the id as array('type'=>self::TYPE_UINT, 'auto_Increment'=>true), in the getFields section. I expected the id to be available, any reason why it's not?

PHP:
protected function _postSave(){
    item = $this->getMergedData();
    item['id'];
}
 
The column in the table has likely been defined as auto_increment, if that's what you mean.
 
Top Bottom