Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPA ResultMap parsing #94

Open
kenjdavidson opened this issue Jan 18, 2019 · 1 comment
Open

JPA ResultMap parsing #94

kenjdavidson opened this issue Jan 18, 2019 · 1 comment

Comments

@kenjdavidson
Copy link

kenjdavidson commented Jan 18, 2019

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.

@harawata
Copy link
Member

Hi @kenjdavidson ,

Assisting migration from JPA sounds like an interesting idea.
Please send us a PR when you have some spare time.
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants