incubator icon indicating copy to clipboard operation
incubator copied to clipboard

Oracle auto incremented ID column is empty after model->save()

Open sergeyklay opened this issue 8 years ago • 4 comments

From @skaosYan on June 8, 2015 9:58

I have Phalcon 2.0.2 and Oracle 12c. I have created sequence and set getSequnceName() function for my model. But model->save() still raises an error "ORA-01400: cannot insert NULL" for a primary key.

Copied from original issue: phalcon/cphalcon#10485

sergeyklay avatar Jun 23 '17 14:06 sergeyklay

From @skaosYan on June 8, 2015 18:30

Does anybody have any clue, is it a bug?

sergeyklay avatar Jun 23 '17 14:06 sergeyklay

From @andresgutierrez on July 1, 2015 14:13

Are you manually setting the meta-data of that model?

sergeyklay avatar Jun 23 '17 14:06 sergeyklay

From @skaosYan on July 1, 2015 19:7

No, I do not use metadata classes. I only use columnMap (actually I am forced to use columnMap, because Phalcon by default generates column names in quotas , when Oracle treats quotes as case-sensitive names).

sergeyklay avatar Jun 23 '17 14:06 sergeyklay

From @skaosYan on July 1, 2015 19:11

Do you need any logs or additional info?

sergeyklay avatar Jun 23 '17 14:06 sergeyklay