- This topic has 7 replies, 3 voices, and was last updated 10 years, 6 months ago by raydawg2000.
-
AuthorPosts
-
raydawg2000ParticipantIt would be great for the reverse engineering process to generate generic variables
for example
private Set<MyObject> objects= new HashSet<MyObject>(0);
instead of
private Set objects= new HashSet(0);
I am aware that this works when using Annotations, but that is not an option for us and this feature for XML Mapping support would be great.
Thanks
-Ray
support-swapnaModeratorRay,
We already have an enhancement request filed. I will check with the team on the status and keep you posted.
Brian FernandesModeratorRay,
Just to confirm your requirements, you want this sort of code to be generated when using .hbm.xml files and not annotations?
raydawg2000ParticipantSorry for the delay, yes that is correct. We do not use annotations in our projects but we do use the .hbm.xml files for attribute mapping.
Thanks
raydawg2000ParticipantAlso to add to this, when MyEclipse generates the getters/setters for these attributes they should also have the generics for them as well
public Set<MyObjects> getObjects() {..}
public void setObjects(Set<MyObjects> objects) {..}for example
raydawg2000ParticipantAny more information available about this request?
Brian FernandesModeratorRay,
Unfortunately no work has been done on this yet, but I have put this on the 2015 timeline. I’m not sure if will land for the EA release but pending unforeseen complications we should have it in for GA.
raydawg2000ParticipantThanks for the update. Since the work on these issues hasn’t been addresses yet I will mention another thing. This may be implied as part of the rev-eng process but I’ll say it anyways.
I mentioned the generated domain POJO classes in the original post, but this update I believe should also effect the hibernate DAO objects that are generated. Currently the class files have a bunch of generated methods like this
public List findByProperty(String propertyName, Object value) { log.debug("finding AdjustmentType instance with property: " + propertyName + ", value: " + value); try { String queryString = "from AdjustmentType as model where model." + propertyName + "= ?"; return getHibernateTemplate().find(queryString, value); } catch (RuntimeException re) { log.error("find by property name failed", re); throw re; } } public List findAll() { log.debug("finding all AdjustmentType instances"); try { String queryString = "from AdjustmentType"; return getHibernateTemplate().find(queryString); } catch (RuntimeException re) { log.error("find all failed", re); throw re; } } etc.....
The return types on those generated methods should also have Generics declarations as well
Thanks
-
AuthorPosts