DetallesXAspirante da = DetallesXAspirante.createDetallesXAspirante(session().defaultEditingContext(),
Integer.valueOf(doc).intValue() , eMail, Integer.valueOf(espe).intValue(),
Integer.valueOf(idiom).intValue(), Integer.valueOf(nivForm).intValue());
Aspirante a = Aspirante.createAspirante(session().defaultEditingContext(),
dir, Integer.valueOf(doc).intValue(), tel, da);
session().defaultEditingContext().saveChanges();
So, it id work, I was jsut wondering if its the correct way to do it, I know there should be a try catch when the saveChanges() its invoked , but how can If there was an error with the connection, or a duplicate PK, yes I can get the message and show it, but the idea is that the system should say the user what was the error in a friendly way, like if the new aspirante its already in the db,.. or somehing like that..
Thanks
Gus