I have an entity of type A with a referenced member entity of type B. I want to insert a relationship between an instance of A to an existing instance of B without having to fetch B.
Is there a way to do it simply by ID? Something like:
B mockB = new B();
mockB.id = "id_persisted_b";
instanceA.setB(mockB);
Thanks.