- This topic has 3 replies, 2 voices, and was last updated 15 years, 4 months ago by Brian Fernandes.
-
AuthorPosts
-
Dino FloresMemberI have been working on 2 existing (hibernate)projects with MyEclipse for the past 2 years.
Now when creating a NEW project I cannot seem how to generate Java 5 structures when doing a Hibernate Reverse engeneering.
I keep getting UNTYPED structures like
private Set insureds = new HashSet(0);
instead of
private Set<Insured> insureds = new HashSet<Insured>(0);When I look at the two existing projects i see in the generated code:
/ Generated Jan 4, 2008 9:52:53 AM by Hibernate Tools 3.2.0.b9Are java 5 structures supported by MyEclipse ? I am confused. Please assist.
Regards,
Dino
Brian FernandesModeratorDino,
Did you create your new project with Hibernate 3.2 capabilities?
You can look at the MyEclipse > Hibernate page under your project properties and check the version.
Dino FloresMemberYes, hibernate is selected. The ONLY way i get java 5 structures is when using JPA and Hibernate as implementation and then using JPA reverse engeneering.
When using only hibernate (‘add hibernate capabilities) and then selecting the options you indicate i get non java5 structures.
In februari this year i tried the same and with the same effect. I am creating a brand new project (in an existing workspace).
I just tried it again and in the screen in the wizzard i do see ‘Java complicance level 5’ selected. No it just does not work i keep getting (see below)I have just jesterday started this new project with JPA+Hibernate, but i prefer just Hibernate, am still NOT too late to switch. This code is to integrate into a larger system and would be the only JPA code, I prefer to switch. Do you have any more suggestions ?
private String bestemmingLandType;
private String certificaatNummer;
private Set insureds = new HashSet(0);
// Constructors
Brian FernandesModeratorDino,
Sorry for the late response.
Generic types are only generated if you use Hibernate 3.2 and choose to add annotations to the POJOs – see the attached screenshot for details.
If, during generation you choose the first option instead and choose to generate POJOs and hbm.xml files, generic types will not be used.
If you go to the MyEclipse > Hibernate page under your project properties and check the version, please ensure that it says Hibernate 3.2 and not some other version or the option to use annotations will not be available during RE.
Attachments:
You must be logged in to view attached files. -
AuthorPosts