Skip to content

Remove opinionated UUID default from core ORM #88

Closed

Description

@ren0503

The current implementation embeds a base struct with uuid.UUID and a default generator (uuid_generate_v4()), which makes the ORM opinionated and tightly coupled to PostgreSQL and a single ID generation strategy.

To keep tinhtinh/sqlorm minimal, flexible, and database-agnostic, this behavior should be removed from the core.

Scope:

  • Remove the embedded base model that enforces uuid.UUID as the default primary key.
  • Remove hardcoded dependency on uuid_generate_v4() in schema generation.
  • Ensure the ORM does not assume any ID type or generation strategy by default.
  • Leave ID strategy decisions to the application layer.

Expected Outcome:

  • Core ORM becomes neutral regarding primary key type and ID generation.
  • Better compatibility with different databases and legacy systems.
  • Reduced long-term maintenance and architectural constraints.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions