Skip to content

Map table columns to model properties #540

@Tigrov

Description

@Tigrov

Proposed new feature or change

CREATE TABLE "user" (
  "id" INT PRIMARY KEY,
  "first_name" VARCHAR NOT NULL,
  "last_name" VARCHAR NOT NULL,
  "created_at" INT NOT NULL,
);
final class User extends ActiveRecord
{
    public int $id;
    #[Column('first_name')]
    public string $firstName;
    #[Column('last_name')]
    public string $lastName;
    #[Column('created_at')]
    public string $createdAt;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions