java - Elegant way to handle upsert with Hibernate and MySQL -
i'm working on batch import feature sits on top of hibernate , mysql. goal have upsert functionality several tables. i'm finding myself writing lot of code deal seeing if row exists key , branching right method. wondering if there might better way, i.e. analogous tools come sql-server ssis hibernate , mysql. tools or elegant solutions have used handle bulk upserts hibernate and/or mysql?
you might mysql's on duplicate key update feature:
http://dev.mysql.com/doc/refman/5.1/en/insert-on-duplicate.html
Comments
Post a Comment