Skip to content

JPA ResultMap parsing #94

Open
Open
@kenjdavidson

Description

@kenjdavidson

Hey, this is more of an request than a bug. I'm also done most of it in a fork so I'm not sure if you want me to clean that up and then pull request or if you want to look into it. But essentially I didn't have a 1:1 with column names, so I decided to implement some JPA annotation reading during the processing of the result map items:

@Entity
@Table(name="table1")
public class Table {
   @Id
   @Column(name_"the_id")
   private long id;

   @Column(name="tbl_name")
    private String tableName
}

into:

<resultMap ...>
    <id property="id" column="the_id" />
    <result property="tableName" column="tbl_name" />
    ...
</resultMap>

It needs to be cleaned up in terms of:

  • Converting One to Many into <Collections>
  • Converting One to One into <Association>

but for the most part it's been working well to speed up my conversion. Let me know if its worth while to you, if not, I'll just keep maintaining it.

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