mybatipse
mybatipse copied to clipboard
JPA ResultMap parsing
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.
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!