> Hmm, I see, so if I excute a query and then create an object that belongs to that set, then call the query again, I won't get the object back? That's pretty much what I'm seeing, but not what I expect at all, I was expecting that the object would be returned in the second query.
That doesn't happen with ordinary queries. Only with automatic queries that are used for inverse fields, after the inverse field has already been initialized.
> Do I need to call refresh() on the object, query, or EntityManager?
The argument to refresh is the object that contains the inverse field. This way you enforce reloading the object and running the automatic query of the inverse field in that object again.
> ps: setting FlushModeType.AUTO in the EntityManager resulted in a huge exception message.
Please post it (or send it by email).