You can try adding use.autoincrement.id=true to TurbineResources.properties.
In
BasePeer.doInsert() this will do an insert assuming the database has an auto
increment feature like mysql. This feature has not been thoroughly tested
so
your feedback is appreciated.
Or you can insert values into ID_TABLE for each table in Turbine that needs
to generate primary keys with the following:
insert into id_table (id_table_id, table_name, next_id, quantity)
values (1, 'Permission', 1, 10);
insert into id_table (id_table_id, table_name, next_id, quantity)
values (2, 'UserRole', 1, 10);
insert into id_table (id_table_id, table_name, next_id, quantity)
values (3, 'Visitor', 1, 10);
I've added this to the mysql_id_table.sql
Let me know how it goes.
> Hiya,
>
> What should be in ID_TABLE? I generated the empty table
> but as a result I always get a
> java.lang.ArrayIndexOutOfBoundsException
> in org.apache.turbine.util.db.IDBroker.getIds. When it calls
> the function:
>
> private int[] getIds(Vector availableIds, int
> numOfIdsToReturn)
>
> the Vector is always empty and I get the exception when I
> try to add
> a new record to any of the tables (user, role, permission,
> etc.). I'm
> using MySQL btw.
>
> Thanx in advance.
> Kevin
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]