Hi,
Is there any functional difference between these two snippets (note the order
of the last two statements)? When I look at the DB tables in the first case the
name of the Card is null. Why so? I was dead sure any changes made to
persistent object are flushed at the end of the transaction, so those two
examples should give the same result. Everything is as expected in the second,
the name of the Card is set properly.
Can anyone comment on this?
Thanks,
| @Name("initDBBean")
| @Scope(ScopeType.APPLICATION)
| public class InitDBBean {
| @Create
| @Transactional
| public void init() {
| Card card = new Card();
| entityManager.persist(card);
| card.setName("cardname");
| }
| }
| }
|
| @Name("initDBBean")
| @Scope(ScopeType.APPLICATION)
| public class InitDBBean {
| @Create
| @Transactional
| public void init() {
| Card card = new Card();
| card.setName("cardname");
| entityManager.persist(card);
| }
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111395#4111395
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111395
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user