[jboss-user] [EJB 3.0] - Re: @id id data type: primitive or object which one is bette

mazz@jboss.com do-not-reply at jboss.com
Wed Nov 14 17:00:11 EST 2007


i use primitives, seems to make the most sense (since its a primary key, its can't be nullable, so using larger Object representation doesn't seem necessary).

Some people don't like setting the primitive int to "0" to indicate the ID isn't set - if you are one of those people, use Integer so you can set it to null to indicate the primary key isn't set yet.

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

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



More information about the jboss-user mailing list