[jboss-user] [EJB 3.0] - Re: EJB3 PersistanceManager confusion

lpiccoli do-not-reply at jboss.com
Tue Oct 31 20:59:24 EST 2006

hi al,

can u explain the strategy us described reviously
anonymous wrote : 
  | 2) Don't specify the PK; dont set the ID

Given the ID in the debtor class is an int. 

  |               public void setId(int id) {
  | 		this.id = id;
  | 	}

I have a question 

1) The default value with be '0'. How does the entitymanager.merge differenciate between '0' default and a debtor.setId(0)?

I can see how it can identified as 'null' by using a Integer object instead of an int.

many thanks


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982261#3982261

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982261

More information about the jboss-user mailing list