Postgres - Id Bigserial - Null Value On Save

I’m working with yii 1.1.13 on a project. We are having trouble getting a successful insert to a table with,

id bigserial NOT NULL,

When I check the actual sql, yii is trying to set the id field to NULL.

I’ve tried overriding the primaryKey() function,

I’ve looked through the rules.

I’ve attempted to unset() the attribute.

The next thing I was going to try was calling nextval on the sequence in the save function for the model, and stuffing the id into the ‘id’ attribute, but I keep thinking there has got to be something simple I’m missing.

Can someone tell me how stupid I am?

AFAIR this was fixed in 1.1.14. Just update the framework.

That would be awesome. But its not under my control.

Is there a workaround?

Yes, there was some hack involving beforesave(?) hook, im pretty sure you can easily find it in google. Basically you just get next sequence number from php.

But i would rather insist on upgrading kernel.

Heres the issue i suppose

Yep, that’s exactly what I’m seeing. Thank you!

I’ll bubble this up to see if we can’t upgrade.