In my current task, we are adding a new table to the database to implement a new functionality. We are using hibernate+spring for the project.
SO my question is since we already have hibernate files and java files for all the tables(i am not sure about the terminology i mean pojo files for each table), should I just create a new java file and the related hibernate file by myself?
please tell me if I am on the right track. any help would be appreciated.
What William is referring to is using the hbm-ddl-auto property to generate the tables FROM the objects. Hibernate also has the facilities to generate the java objects from the hbm files. However I would say the best approach is forget all the generation stuff and just create your domain objects (pojos) and the hbm mapping files yourself.
It looks like the middlegen plugin is something that generates all of this for you from the tables. In this case you would add your new tables and generate the mappings and pojos from the database. I typically don't trust these kind of tools and prefer to do it myself. However you may have to be consistent with what others are doing. I would talk to your team.