For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 19 years, 3 months ago by
Riyad Kalla.
-
AuthorPosts
-
rsmithhMemberHi Chaps
I’m using 5.5M2 to create a project based on reverse engineering into JPA. I’ve found a number of snags that I could use some help with. Excuse the multiple questions but I hope they are each simple and possibly related.
1. The option to add JPA capabilities to a project is greyed out for everything but Web projects. Why? I want to add JPA to an enterprise app project.
2. When I reverse engineer, the generated annotations are on the accessor methods instead of the attributes.
3. I have a primary key defined as “not null default nextval(‘dept_dept_id_seq’)” but the generated entity still contains setter methods and doesn’t define @GeneratedValue.
4. When I went a step further and reverse engineered the Entities to UML, there were no associations generated.
Overall it feels like the JPA stuff isn’t quite ready yet. I realise it’s Beta code, but if you could give me some timeline expectations that would be helpful.
Many thanks
RoyMay 1, 2007 at 2:55 pm #269612
Riyad KallaMember1. I couldn’t reproduce this problem (See screenshot please)
2. Both are acceptable, we chose accessors. We could probably put a preference in here somewhere to allow the user to choose…
3. Looks like a bug, will file.
4. What associations were you expecting? Please give an example.
Attachments:
You must be logged in to view attached files.May 3, 2007 at 12:28 pm #269712
rsmithhMemberHi chaps
Many thanks for replying – herewith my replies1. To recreate :-
– Create a new Project. Choose Enterprise Application and Java EE 5.0 compliance
– If you try to add JPA as your screenshot, the option is NOT there.
– Create a new Project. Choose Web Project instead of Enterprise Application.
– Now you can add JPA2. I was getting runtime errors from Toplink which were fixed by moving the annotations from the accessors to the attributes. This may be a bug in Toplink – who knows. Nevertheless it is more conventional and intuitive to place the annotations with the attributes.
3. Thanks. fyi my database is Postgresql 8.2 using the JDBC 3 driver.
4. Take the standard Department/Employee database as an example. When I reverse engineer to Java classes, the one-to many relationship between Department and Employee is recognised. When I reverse that to a UML Class Diagram I get the Dept and Emp classes, but there is no association between them.
Another way of putting it is that I should be able to reverse engineer from a database, through Java classes, to UML. I should then be able to delete the database and classes and forward engineer to the same database.
This means that the JPA annotations would need to be carried into the UML (perhaps as structured comments) such that a subsequent generation can recreate them.
Perhaps I’m being too ambitious, but unless I can do this then I don’t really see the point in having UML. It ends up being nothing more than Visio. On the other hand, if you can achieve this end-to-end integration then you have a tremendously powerful tool.
thanks again
RoyMay 3, 2007 at 12:32 pm #269713
rsmithhMemberPS on point 4.
When I tried this again it worked, so it must have been a glitch.However my “end-to-end” wish list still applies.
May 3, 2007 at 6:25 pm #269736
Riyad KallaMember1. To recreate :-
– Create a new Project. Choose Enterprise Application and Java EE 5.0 compliance
– If you try to add JPA as your screenshot, the option is NOT there.
– Create a new Project. Choose Web Project instead of Enterprise Application.
– Now you can add JPAAhh, that’s not a bug, enterprise projects are like a meta-project. They are an “umbrella” meant to assign modules to do and use to deploy them. They don’t actually contain code/data. You add Web/EAR/Java modules to an Enterprise project and deploy it, and it creates the EAR and updates all deployment descriptors.
2. I was getting runtime errors from Toplink which were fixed by moving the annotations from the accessors to the attributes. This may be a bug in Toplink – who knows. Nevertheless it is more conventional and intuitive to place the annotations with the attributes.
I think this should be an option, maybe a flag somewhere on the wizard.
However my “end-to-end” wish list still applies.
Definately
May 4, 2007 at 12:57 am #269739
rsmithhMemberThanks again for your quick reply.
One more round and then I’ll let you go 🙂
1. Is the significance of the different project types documented somewhere?
4. Would it be possible to get a description of the end-to-end capabilities of MyEclipse?
I see the ability to model from UML through Java Generation through to schema generation and then back again as being very powerful. I decided to look at MyEclipse as my attempts to achieve this using disparate plugins failed as there was no integration. My expectation is that MyEclipse would be integrated end-to-end.
Rather than waste time figuring out what it can and can’t do, and bugging you with questions, could you post a brief statement about what it can and can’t do and what the roadmap looks like.
Thanks again for taking the time to reply to my newbie questions.
May 4, 2007 at 9:44 am #269748
Riyad KallaMember1. There is not an explicit matrix somewhere, but I think running through the enterprise tutorial quickly, or just skimming should clarify: http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/
The gist is that Web/EJB/Java are all “real” projects. Enterprise is a meta-project and contains the others as modules. We tried to model the J2EE deployment model as accurately as possible.
4. Would it be possible to get a description of the end-to-end capabilities of MyEclipse?
There is no complete end-to-end story at the moment, and I cannot provide a roadmap (sorry). The reason is that we are completely user-demand based on our releaes, which is a blessing (you get what you want) and a curse (you don’t know it until a few weeks out, or on a release).
-
AuthorPosts
