Skip to content

org.springframework.data.relational.core.mapping '@Table' name property #72

Description

@kimdg1105

Hi. I use spring data jdbc and 'infobip-spring-data-querydsl:7.2.0' (also, infobip-spring-data-jdbc-annotation-processor.)

When i generate Q class, most of entities are created well. But, Entities with @table( name = "somthing") annotation, Q class's constructor generated like this.

public QSlotGroup(String variable) {
    super(SlotGroup.class, forVariable(variable), null, "");
    addMetadata();
}

As you see, table name Field fill with "".

public RelationalPathBase(Class<? extends T> type, PathMetadata metadata, String schema,
        String table) {
    super(type, metadata);
    this.schema = schema;
    this.table = table;
    this.schemaAndTable = new SchemaAndTable(schema, table);
}

@Table(name = "slot_group") -> @Table("slot_group")

public QSlotGroup(String variable) {
    super(SlotGroup.class, forVariable(variable), null, "slot_group");
    addMetadata();
}

I solved it by changing it like this, but I think there may be other solutions or improvements, so I'm writing this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions