From: Roman R. <ro...@ro...> - 2010-12-26 11:05:46
|
>> I do not know the name of the PK column that was generated. > > But how in this case Joomla manages to cope with "generated value is filled in the object"? Yes, you are right. In that case I have the name of the column. Considering the case that INSERT is generated inside that function, it will be easy to use RETURNING clause. More problematic is the second case where arbitrary SQL is set from outside and then this function is called. That is the main use case I am worried about, since the function to execute SQL and the function to get last generated ID are public. They are used in base Joomla in two places, those can be fixed, but they can be used in thousands of extensions, that would be an issue. Roman |