Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle Model::insert does not work #11251

Closed
rlaffers opened this issue Dec 21, 2015 · 3 comments
Closed

Oracle Model::insert does not work #11251

rlaffers opened this issue Dec 21, 2015 · 3 comments

Comments

@rlaffers
Copy link
Contributor

Phalcon 2.0.x, Oracle 10g, PHP 5.4.45

Inserting a model in Oracle does not work. It did work in Phalcon 1.3.x.

        $robot = new Robots();
        $robot->title = 'Marvin';
        $robot->year = '2001';
        $robot->current_state = 'on';    
        echo 'creating robot...<br/>';
        try {
            $result = $robot->create();
        } catch (\Exception $e) {
            echo $e->getMessage();
            die('failed to create robot');
        }
        echo 'created robot'; // never gets here

The problem: The record is not created and PHP never gets to the last line. No exceptions were thrown. Looking at the DB for last run queries, it doesn't seem as if Phalcon even attempted to run any INSERT query on the table.
Strangely, the output to screen reads:

creating robot...
array (
  'ID' => '2605',
  0 => '2605',
)

The number 2605 corresponds to a new value gotten from the table sequencer. This seems like a forgotten piece of debug code somewhere in Phalcon. Can anybody give pointers where to search for it? I may try to fix it.

@Jurigag
Copy link
Contributor

Jurigag commented Dec 21, 2015

Well you would need to check what was doing Oracle adapter in 1.3.x and whats the diffrence with 2.0.x. But you need to know C language.

@rlaffers
Copy link
Contributor Author

Well that's obvious. I was rather hoping for a quick pointer from someone who recently has delved into Model inserting or saving in Phalcon 2.0.x to cut down on hunting the bug time.

@sergeyklay
Copy link
Contributor

Phalcon does not support Oracle. Refer to #12008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants