RE: Re: How to change the auto pk increment to 1?

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Tue Jan 03 2006 - 09:14:24 EST

  • Next message: Kevin Menard: "Re: cvs access"

    Well, it's not actually a problem with Cayenne. There is no realistic
    way to return cached PKs to the database. If you don't like Cayenne's
    PK support or it does working with your schema, you can always create
    your own PK generator, which is what I did (needed custom PKs to work
    with schema). It sounds like you want to set the PK cache to
    one-at-a-time, but this will hurt your insert performance (which may not
    be an issue if you don't do many inserts).

    /dev/mrg

    -----Original Message-----
    From: news [mailto:new..ea.gmane.org] On Behalf Of Ahmed Mohombe
    Sent: Monday, January 02, 2006 9:35 AM
    To: cayenne-use..bjectstyle.org
    Subject: Re: How to change the auto pk increment to 1?

    > Also, Cayenne caches 20 PKs (by default), but it increments them by 1
    > until the cache is exhausted and then it gets more PKs. If you are
    > seeing increments by 20, it sounds like you are starting and stopping
    > your application repeatedly (say, while developing).
    Exactly, but because of the nature of the application this repeated
    restart
    is also a requirement, (so it happens in production too).
    There is a front application that restarts on demand several backend
    applications
    that are all *isolated* and have their own DB (thus isolated ORMs too).

    > Cayenne doesn't
    > return unused PKs when an application terminates, so you'd essential
    > "blow" those PKs.
    IMHO *this* problem should be solved. This way Cayenne would behave like
    one expects.

    Thanks in advance,

    Ahmed.



    This archive was generated by hypermail 2.0.0 : Tue Jan 03 2006 - 09:14:32 EST