One to Many Hibernate, adding many side with proxy object
<p>I have two tables, say <code>A</code> and <code>B</code>. A is <code>One side</code>, and B is <code>many side</code>. Foreign key is in B only.</p>

<p>I need to know for a scenario where I need to persist <code>entity A</code>, along with adding relation to <code>entities in B</code>. (<strong>B entities were already present</strong>)</p>

<p>I tried it using <code>proxy object</code> using method <code>getReference()</code> of JPA. 
So I took proxy objects of B.</p>

<p>But when I tried doing <code>b.setA(a)</code> I saw hibernate loading the model despite <code>b</code> being only a reference of B.</p>

<p><strong>b is B object, a is A object.</strong></p>

<p>Can I do better?</p>