Skip to content

Pluggable name translation for enum and composite #859

Closed

Description

@roji

For enum and composite types, Npgsql maps CLR types to PostgreSQL types, raising the question of field mappings. Currently Npgsql doesn't do anything specific, meaning that a field foo in a PG composite type with a field foo will get mapped to a CLR field foo, which violates C# field naming conventions (should be Foo). We already have support for manually specifying [PgName] on the CLR side, but forcing users to annotate all their fields in this way doesn't seem very nice.

Allow the user to specify a FieldMappingConvention which will take care of this translation, and provide a sane default.

Activity

  1. self-assigned this
    on Nov 8, 2015
  2. added this to the milestone on Nov 8, 2015
  3. changed the title [-]Pluggable field mapping convention[/-] [+]Pluggable name translation for enum and composite[/+] on Apr 24, 2016
  4. added 3 commits that reference this issue on Apr 24, 2016
    820cd7b
    8e3f1cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions