Java5 type safety

Hello,

Can I generate java5 type safety code using orm?
Aattached is the code using orm wizard, but not type safety.

Thanks.
George
type_safety.jpg

Hello George,

Thanks for your message. You can generate the ORM code with generics by specifying Generics at Association Handling field (see attached). If you need any help, please do not hesitate to contact me again.

Best regards,
Rain
generics.png

Hi Rain,

I’d like to know how to generate type savety Set or Collection,for example :

I want my code :
private Set artists = new HashSet(0);

But orm wizard only generate :
private Set artists = new HashSet();

Thanks in advance.
Geroge

Hello Geroge,

By selecting Generics in Association Handling option, we will generate code as what you looking for.

Best regards,
Rain

Hi Rain,

Maybe something worng I guess. Please see attached project zip. I did select Generics in Association Handling option but I cannot generate Java 5 code.

Please help me to figure out what’s worng.
Thanks.
Geroge

Hello Geroge,

In your project you have selected “Standard” instead of “Generics” in the Association Handling field. Please make sure you are using “Generics” instead of “Standard” in order to generate Java 5 code. If you have specified “Generics” but still not working, would you mind send me your vp.log file to have a look? The vp.log file can be found inside the eclipse installation directory.

Best regards,
Rain