- This topic has 5 replies, 3 voices, and was last updated 15 years, 7 months ago by Loyal Water.
-
AuthorPosts
-
ArjunReddyMemberHi All,
I recently downloaded a trail version of MyEclipse 7.1.1 IDE and I found it EXTREMELY Useful. I was using it for OpenJPA coding (Followed this tutorial http://www.myeclipseide.com/documentation/quickstarts/jpa/ and did it for OpenJPA even though it was mentioned for JPA in there) and all my DAOclasses and POJO classes have been auto generated by the IDE itself. The Mappings like One-To-Many etc… have been auto generated too when I checked the “Enable One-To-One detection” and “Enable Many-To-Many detection”.
Now my question starts here,
When I checked both of them, My code has all these new relationships defined. The confusing part is, How does MyEclipse detect which mapping to put into our code? I checked both of those above but my code has 1: N and N: 1 mappings and there is no sign of “One-To-One” or “Many-To-Many” mappings. How does this work?Please advice as this is very confusing to me.
Thanks.
Loyal WaterMemberCan you please explain what do you mean by “all these new relationships defined” part? Are the relationships defined wrong or are you just curious how we detect all that stuff?
ArjunReddyMember@support-nipun wrote:
Can you please explain what do you mean by “all these new relationships defined” part? Are the relationships defined wrong or are you just curious how we detect all that stuff?
Hi Nipun,
I meant these @OneToMany, @ManyToOne etc… in my code which I have not defined but got generated automatically by MyEclipse. I am just curious how MyEclipse decides on which relationship to define in our code based on the table names we supply to it. If you could tell me that, it would really help a lot.
Thanks.
Loyal WaterMemberOh, it actually queries the database structure and FK relationships between tables and cols to determine how those get translated to actual annotations.
If you use the DB Explorer to generate the DDL for the tables, you should see in the CREATE TABLE statements, the different FK references and what not that MyEclipse is detecting.
gang.yangMemberWe have recently upgraded from MyEclipse 5.5.1 to 7.1.1. I continued to use the workspace and projects from 5.5.1. I notices some changes in the package explorer display. For example, the EJB3 project name, which belong to an Enterprise parent project, was no longer displayed using the project name. Instead, it was displayed as “Project”. Also I had some hard time to debug. MyEclipse 7.1.1 failed to stop at some break points no matter what I do. I’m wonder if 7.1.1 is backword compatible with 5.1.1’s workspace. Any thing I need to do to upgrade the workspace?
Thanks,
Gang
Loyal WaterMemberGang,
Please refer to this thread:-
https://www.genuitec.com/forums/topic/is-workspace-from-5-1-1-compatible-with-7-1-1/&highlight=#108109 -
AuthorPosts