Comment savoir le résultat d'un update ?
Bonjour :)
La javadoc nous dit:
Citation:
update
public void update(Object object)
throws HibernateException
Update the persistent instance with the identifier of the given detached instance. If there is a persistent instance with the same identifier, an exception is thrown. This operation cascades to associated instances if the association is mapped with cascade="save-update".
Parameters:
object - a detached instance containing updated state
Throws:
HibernateException
Et dans mon code, si j'update un objet qui n'existe pas en base, aucune exception n'est levée 8O Et il n'y a pas de valeur de retour indiquant le résultat de l'update.
Les bras m'en tombent quelque peu...
Suis-je obligé de remplacer mon "hibernateSession.update(objet)" par une requête HQL "à la main" ?
[Edit] pareil pour le delete... au secours :pleure: