I have an entity that has been previously persited and has a @OneToMany relationship with another entity. In order to add a new entity I just add my new entity
You should be able to "see" a generated ID for a new Entity:
after transaction commits, or
after a em.flush() (where em is your EntityManager) while a transaction is active.
Note also that all relationships between Entities need to be resolved in the Java data structures prior persistence. Child references to parents need to be "set", and vice-versa.