facebook

MyEclipse 7.1.1 OpenJPA Support (One-To-Many Mappings etc…

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #297367 Reply

    ArjunReddy
    Member

    Hi 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.

    #297443 Reply

    Loyal Water
    Member

    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?

    #297455 Reply

    ArjunReddy
    Member

    @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.

    #297490 Reply

    Loyal Water
    Member

    Oh, 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.

    #300253 Reply

    gang.yang
    Member

    We 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

    #300295 Reply

    Loyal Water
    Member
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: MyEclipse 7.1.1 OpenJPA Support (One-To-Many Mappings etc…

You must be logged in to post in the forum log in