Skip to content

[Feature Request] Aliases for fields #27

@grisevg

Description

@grisevg

Hi,

I'm trying to use the orm with already existing rails database, but the orm uses created and modified fields instead of rails ones created_at and updated_at.

It would be very useful to be able to make the orm use different database field names from haxe field names.
Maybe something like:

manager.aliases.set("created", "created_at");
manager.aliases.set("modified", "updated_at");

or even a compile time macro

@aliases("created"="created_at", "modified"="updated_at")
class MyModel extends Object {}

What do you think?

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