ok the entityManager in jpa caches… which is normally a good thing… but with OneToMany / ManyToOne mapping its kinda wired… my problem is, that i have an object A and an object B… A has one B… B has a List<A>…
- so created a B and persisted it…
- created a A with the B object and persited it
- checked A and has B 🙂
- checked B and has an empty list 🙁
and everything is in one transaction… unit test… if i persist it B with A in the list.. it works… but DB looks exactly the same… so there is a cache…
how can i kill it? or is it really a problem?