mybatis / mybatipse

Eclipse plugin adding support for MyBatis SQL Mapper Framework.
Eclipse Public License 1.0
332 stars 91 forks source link

Jpa mapping #101

Closed kenjdavidson closed 5 months ago

kenjdavidson commented 4 years ago

Issue #94

I get that it's like a year later, but I've been using this and it has sped up a lot of my development/conversion to MyBatis. I just setup the project again and fixed a couple bugs that make it more accurate. There are still a number of things missing:

It's really just a rough start for the functionality, but at least it's a start. I can continue to work on it as I start modifying the original code to be better formatted and take advantage of more object relationships (rather than how it's working now).

harawata commented 4 years ago

Thank you for the PR, @kenjdavidson , I'm sorry about the delay. I don't have much spare time lately and am also working on something super complicated, so please give me some more time!

kenjdavidson commented 4 years ago

Anything you'd like me to look at with regards to this?

harawata commented 4 years ago

Hello @kenjdavidson ,

Sorry about the delay! I actually want to see if it's possible to retrieve information about JPA annotations when this action is triggered rather than parsing and storing it in BeanPropertyCache for every bean. How does that sound?

As it's been a while since the last release, I plan to release 1.2.4 without this soon.

kenjdavidson commented 4 years ago

Right on, I will try to take a look at it next time I have a couple hours free to do so. I remember that I did it a particular way because there was missing information about the Class being on which the task was being performed, it was a while ago, so I can't exactly remember. In order to get what I wanted to work, I would have had to re-write a larger portion of the handlers, which I wasn't ready to do at the time.

Not sure when, but I'll follow up with some analysis of how to get that working.

harawata commented 4 years ago

I haven't reviewed it thoroughly, so it's possible that I am missing something. As you have done a lot already, I was going to try it myself, but it would be greatly appreciated if you could take a look!

kenjdavidson commented 3 years ago

With regards to the BeanPropertyCache I'm not entirely sure what the best course of action is. The BeanPropertyCache is refreshed if the Bean is changed:

If the goal was to ensure that all the annotations are up to date, then this is already done.

The original BeanPropertyInfo is still required, as if there is no @Entity on found, then it reverts back to the original functionality of just using the field name (from the BeanPropertyInfo). The only way to do this would be to:

Thoughts?