You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Mahmut Izci <ma...@freenet.de> on 2006/10/06 09:26:12 UTC

Howto modify primary key cache size

Hi,

I would like to increase the default primary key cache from it's default 
size of 20 to e.g. 50.
Is there a configuration setting or somthing like that for this?
I'm using cayenne 1.1.4 with mysql.

Thanks
Mahmut

Re: Howto modify primary key cache size

Posted by Andrus Adamchik <an...@objectstyle.org>.
Yes it did. It can be set via API (JdbcPkGenerator.setPkCacheSize(..)):

http://incubator.apache.org/cayenne/1_1/api/cayenne/org/objectstyle/ 
cayenne/dba/JdbcPkGenerator.html

Andrus

On Oct 6, 2006, at 10:53 AM, Mike Kienenberger wrote:

> As Michael says, not sure if the default 1.1 jdbc pk generator
> supported cache size.


Re: Howto modify primary key cache size

Posted by Mike Kienenberger <mk...@gmail.com>.
I don't have the 1.1 modeler around, but in the xml, I see this in my
1.1 DataMaps:

	<db-entity name="ACCOUNT">
[...]
		<db-key-generator>
			<db-generator-type>ORACLE</db-generator-type>
			<db-generator-name>ACCOUNT_SEQ</db-generator-name>
			<db-key-cache-size>1</db-key-cache-size>
		</db-key-generator>
	</db-entity>

As Michael says, not sure if the default 1.1 jdbc pk generator
supported cache size.

On 10/6/06, Michael Gentry <bl...@gmail.com> wrote:
> I *think* in 1.1.x, you might have to write your own adapter.  This
> wouldn't be as hard as it sounds -- copy the existing one or possibly
> even subclass the current one -- I don't have the 1.1.x source handy
> to look.  If you can use 1.2, this becomes easier as there is support
> for more PK generation options.
>
> /dev/mrg
>
>
> On 10/6/06, Mahmut Izci <ma...@freenet.de> wrote:
> > Hi,
> >
> > I would like to increase the default primary key cache from it's default
> > size of 20 to e.g. 50.
> > Is there a configuration setting or somthing like that for this?
> > I'm using cayenne 1.1.4 with mysql.
> >
> > Thanks
> > Mahmut
> >
>

Re: Howto modify primary key cache size

Posted by Michael Gentry <bl...@gmail.com>.
I *think* in 1.1.x, you might have to write your own adapter.  This
wouldn't be as hard as it sounds -- copy the existing one or possibly
even subclass the current one -- I don't have the 1.1.x source handy
to look.  If you can use 1.2, this becomes easier as there is support
for more PK generation options.

/dev/mrg


On 10/6/06, Mahmut Izci <ma...@freenet.de> wrote:
> Hi,
>
> I would like to increase the default primary key cache from it's default
> size of 20 to e.g. 50.
> Is there a configuration setting or somthing like that for this?
> I'm using cayenne 1.1.4 with mysql.
>
> Thanks
> Mahmut
>