- This topic has 1 reply, 2 voices, and was last updated 13 years, 8 months ago by support-swapna.
-
AuthorPosts
-
nuspyMemberHi all.
I am trying MyEclipse from a couple of days, and I am stucked..
I can’t scaffold starting from domain to a Database.
I have seen a lot of tutorials that make reverse engineering (Database to domains, DAO) but noone from Domain Class to Database.
This is what I make:1) create the domain classes (for commodity just say one only, named Car)
2) the content is pretty basic, just to try:
private long Id;
private String model;
3) I generated getters and setters (Source, generate…)
4) MyEclipse – > Add JPA Capabilities
– select TopLink. Next
– specify the data source to MySQL (prec. created Driver & Catalog/Schema), then enable dynamic DB table creation. Finish (this point has been avoid in another test, with same failure)
5) MyEclipse – > Add JPA Annotation
– annotate fields. Finish.
In the domain class have been generated the imports (import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.Id;), @entity, @id and@GeneratedValue.
6) MyEclipse – > Scaffold Spring CRUD Application
– select JPA Entities. Next
– add Car domain. Next
– Package com.test
(selected: scaffold web layer, Service layer, DAO). Next
– Select DB connection previously setted (MySQL) Next
– select Spring MVC Scaffolding. Next
– Next (in personalize UI)
– Next (in select Target Folder, using default ones)
– Summary -> Finish.A lot of libraries, DAO files, controllers, service Layers have been added.
But the database has not been created.
What I make wrong? How database table will be generated?Thank you for your help… if I solve that I will by sure subscribe to MyEclipse!
support-swapnaModeratornuspy,
Please refer to your post here :
https://www.genuitec.com/forums/topic/scaffolding-from-pojo-domain-class-not-working/#post-315184 -
AuthorPosts