Hi! bfo81,
great!
I have one question as following:
Suppose I have two tables
| user(id, name)
| userlog(id,userid,content)
|
I'd like to create a new user and write the log at the same time.
Suppose I use extended persistent manager.
I have the following code:
| @In @Out user;
|
| @PersistenceContext(type=EXTENDED)
| private EntityManager em;
|
| public void new_user()
| {
|
| user.setName("user");
| Userlog userlog=new Userlog();
| userlog.setContent("register");
| userlog.setUser(user);
|
| -----
|
| }
|
the question is:
1)Do I need to em.persist to save user and userlog?
2)If it is needed. Which one is first? user or userlog
thanks in advance
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989578#3989578
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989578
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user