Thanks for your answer, under this scenario I described in detail :
- I did flush after merge.
- I query the data by find or QL like "select u from User where id = :id", they execute and send SQL both. But the result is not sync data like what i say in last mail.
- I watch the data in Eclipse by breakpoint. I saw the entity and every fields have IDs, they are not db column, same to cache identity, created by JPA.
- My environment : Hibernate-JPA-2.0, Warp-persist 2.0 (Guice 2.0), Struts 2
JPA persistence.xml file is in the attachment files.
Warp-persist config is very simple:
public void configure() {
bindConstant().annotatedWith(JpaUnit.class).to("defaults");
install(PersistenceService.usingJpa().across(UnitOfWork.REQUEST)
.forAll(Matchers.any(), Matchers.annotatedWith(Transactional.class))
.buildModule());
bind(Initializer.class).asEagerSingleton();
// others
install(new ComponentInjectionModule());
install(new SettingsModule());
}
@Singleton
public static class Initializer {
private final Logger logger = Logger.getLogger(getClass());
@Inject
Initializer(PersistenceService service) {
service.start();
}
}
Need more setup information ?
This problem has troubled me for two weeks, really hope to fix it as soon as possible.
PS: I write letter need help of translator tools. excuse my bad writing ability.
Best regards
--
Bevis