You need to cast it because the underlying value depends on what your backend persitence mechanism.. For example, if your backend is LDAP, then getId() would return something quite different from a database. And inmemory could return a hash as the id...
ERic > -----Original Message----- > From: Henning P. Schmiedehausen [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 03, 2004 3:13 PM > To: [EMAIL PROTECTED] > Subject: Re: getId() returns object? > > > "Martin Wendel" <[EMAIL PROTECTED]> writes: > > >How come that user.getId() returns an object, instead of the > value in the id > >column of the user table? > > On 2.3 or on 2.4-dev ? > > >And how do I extract that value from the object? Everywhere I > looked, they > >all used long as return value, not Object... > > cast it? > > Regards > Henning > > -- > Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH > [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ > > RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire > Linux, Java, perl, Solaris -- Consulting, Training, Development > > "Fighting for one's political stand is an honourable action, but re- > fusing to acknowledge that there might be weaknesses in one's > position - in order to identify them so that they can be remedied - > is a large enough problem with the Open Source movement that it > deserves to be on this list of the top five problems." > -- Michelle Levesque, "Fundamental Issues with > Open Source Software Development" > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
