#Why is it using Wrapper of long?

1 messages · Page 1 of 1 (latest)

spice bay
#

I'm currently reading Spring in Action and got a question about this page, which is about working with data with JDBC and JPA

fallen mortarBOT
#

<@&1004656351647117403> please have a look, thanks.

fallen mortarBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

spice bay
#

why is he using the wrapper Long instead of long

pine oriole
#

I don’t think it’s NEEDED

#

I think it just helps because primitive can’t be null

#

So in the sense, your PK will never be null but other fields might be

spice bay
#

pk?

pine oriole
#

Primary key sorry *

spice bay
#

ok thanks