I always feel guilty for posting in these kinds of forums because I know my question has been answered before, I just don't know what to search to find it.
I have URLs stored in a table (essentially just an ID and the text of the URL link) and they need to be globally unique. For performance, I have a data structure that stores some instances in memory to minimize trips to the database. When I parse a web page and it has several links, I want to efficiently find all the URLs that already exist in the database, and create those that don't. Specifically:
How can do this efficiently/in bulk? I'm basically coming to Hibernate with fully initialized URL POJO's except for the persistent ID, and I just need Hibernate to "fill in" the ID with existing IDs or allocate new ones. What I would like to do is similar to an "
upsert", but different because I don't want to update existing instances, and that query doesn't return back any of the rows. thanks in advance for any help!