pupsnow / dphibernate

Automatically exported from code.google.com/p/dphibernate
0 stars 0 forks source link

String keys converted to Integer in ProxyLoadService #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This block in ProxyLoadService is incorrect:

        if (id instanceof String)
        {
            @SuppressWarnings("unused")// For debugging...
            String originalId = (String) id;
            id = Integer.parseInt((String) id);
        }

We shouldn't be blindly casting id's Int -> String, as many id's will be 
Strings.

WORKAROUND:
Comment out this block ( 33 - 38 ).

Need to fix this.

I believe this was added because integer ID's were arriving at this method as 
Strings.  I need to either understand why they were being incorrectly cast as 
Strings originally, or investgiate the daoClass param to understand which type 
the ID is expecting.

Original issue reported on code.google.com by martypit...@gtempaccount.com on 26 Jul 2010 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by martypit...@gtempaccount.com on 27 Jul 2010 at 6:01

GoogleCodeExporter commented 9 years ago

Original comment by martypit...@gtempaccount.com on 27 Jul 2010 at 6:02

GoogleCodeExporter commented 9 years ago

Original comment by martypit...@gtempaccount.com on 15 Mar 2011 at 3:45