I'm using hibernate to auto generate IDs for table, but i need to manually insert some rows (about 10k, just once) related to another table. I'm using Oracle DB. How can I do that? How does hibernate generete values? It is possible to use it?
private Long id;
Of course that's possible, we're doing that all the time. Whether and how depends on the id generation strategy you use and how your database is set up.
We're using a (customized) table generator that generates positive ids so whenever we need to manually insert elements we use negative ids. That way those ids don't interfere with Hibernate's id generation and we are able to immediately identify manually inserted rows.
If you don't like negative ids you could use a different generation strateg, e.g.