Skip to content

Error between Poco::ActiveRecord and Poco::Data::PostgreSQL #4450

@SystemDataModel

Description

@SystemDataModel

Describe the bug
I use Poco ActiveRecord with PostgreSQL 16.

I use ActiveRecord::lastInsertID(Poco::Data::Session& session) where Data::Session is a PostgreSQL Session.

In Data::Session, session.connector() returns "postgresql"

This method is used in ActiveRecord::lastInsertID and test with "if (session.connector() == "PostgreSQL")". This condition is not satisfied.

To Reproduce

m_pSession = Poco::SharedPtrPoco::Data::Session(new Session(PostgreSQL::Connector::KEY, dbConnString));
Context::Ptr pContext = new Context(*m_pSession);

Use this context with ActiveRecord

Expected behavior

Change test "if (session.connector() == "PostgreSQL")" by "if (session.connector() == "postgresql")" in ActiveRecord::lastInsertID

Logs
No Logs

Screenshots
No screenshots

Please add relevant environment information:

  • OS Type and Version : Oracle Linux 9.3
  • POCO Version : Last version from git repo
  • Third-party product (eg. database or library) type and version: PosrtgreSQL 16

Additional context
I use Postgres tables with INHERITANCE relationship between tables.
I use "bigserial" id as primary key in tables

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions