-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Invalid sequence name for PosgreSQL #1022
Comments
You are at the time of inserting data error? |
I try fix it. |
I don't think this need a fix, you can implement the getSequenceName in the controller to tell the ORM which sequence must be used. http://docs.phalconphp.com/en/latest/reference/models.html#auto-generated-identity-columns |
@phalcon getSequenceName will return the full sequenceName it contains the schema? |
Yes, but that happens because the sequence name was not set: class SomeModel extends \PhalconMvc\Model
{
public function getSchema()
{
return 'shemaname';
}
public function getSource()
{
return 'sometable';
}
public function getSchemaName()
{
return 'sequence_name';
}
} |
@phalcon You mean, like this, Will be right: class SomeModel extends \PhalconMvc\Model
{
public function getSchema()
{
return 'shemaname';
}
public function getSource()
{
return 'sometable';
}
public function getSequenceName()
{
return "shemaname.sometable_id_seq";
}
} |
@sjinks How do you see |
@phalcon I've read the docs, of course getSequenceName() fix this issue. But I think framework itself must generate the correct common sequence name, otherwise it is a bug. getSequenceName() should be used if the sequence name is not a standard, but in this case it is a standard. |
schema is missing, valid sequence name - "shemaname"."sometable_id_seq"
The text was updated successfully, but these errors were encountered: