• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with Stale Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with Stale Data


  • Subject: Re: Problems with Stale Data
  • From: "Chris Hoyt" <email@hidden>
  • Date: Tue, 5 Feb 2008 20:15:33 -0500

I just wanted to follow this up.  Changing the objects in my classes from Number to Integer FIXED this problem.  Using Number has never caused me problems before, but I think that is because I declared primary-keys as "long" in other DBs, but this one had them declared as "int". Thanks for your help.

On Jan 29, 2008 9:22 PM, Chuck Hill <email@hidden> wrote:

On Jan 29, 2008, at 6:17 PM, Chris Hoyt wrote:

> I checked the value type as well.  I did update the plugin.
> The problem only occurs when referencing recent records (15 minutes
> or less) then goes away.  That is why I thought it might be a data
> refresh issue.

That sounds more like the PK is getting created with a different Java
class than what it is fetched with.  When they expire out of snapshot
cache, consistent data is fetched.

This might be a bug in the OB plugin.  What Java class are your
keys?  Number is the wrong answer.  :-)  They will be Integer, Long,
BigDecimal, NSData or something concrete.  What value type are you
using?  Check the class after creation and then again after the
problem goes away.


Chuck

>
> On Jan 29, 2008 2:19 PM, Chuck Hill <email@hidden> wrote:
>
> On Jan 28, 2008, at 10:14 PM, Chris Hoyt wrote:
>
> >
> >
> > > java.lang.IllegalStateException: cannot update primary-key
> > > 'assignmentID' form '52067' to '52067' on object
> >
> > What you can't see there is that one of those 52067 is an Integer
> and
> > one is a Long (or a BigDecimal or some class other than what the
> > first one is.
> >
> > I had recently upgraded by database so this looked like a real
> > possibility to me.  Alas, the schema and EOModel both have "int".
> > I am using Webobjects 5.4 on OS X 10.5.1 with Open Base 10
>
> The value type (I, L, D etc) not the external type (int) is the
> potential problem.  It could also be a WO 5.4 and / or OpenBase
> plugin problem.  Did you update the OB plugin?
>
> Chuck
>
>
> --
>
> Practical WebObjects - for developers who want to increase their
> overall knowledge of WebObjects or who are trying to solve specific
> problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>

--

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects






 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problems with Stale Data
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Strange behavior of Derby database. SQL generation (SOLVED) (New issue: 24 bytes auto generated primary keys)
  • Next by Date: NSPropertyListSerialization documentation error ?
  • Previous by thread: Re: Strange behavior of Derby database. SQL generation (SOLVED) (New issue: 24 bytes auto generated primary keys)
  • Next by thread: Re: Problems with Stale Data
  • Index(es):
    • Date
    • Thread