Next PID value without incrementing

13 views
Skip to first unread message

Serhiy Polyakov

unread,
May 2, 2012, 3:36:07 AM5/2/12
to island...@googlegroups.com
I need to get next PID value. When I use this:

$next_pid = Fedora_Item::get_next_PID_in_namespace($name_space);

it returns the value but it also increments highestID in fedora MySQL
table pidGen by one.

Is there any Fedora/Islandora function that gets value without incrementing?

Otherwise I need to write PHP/MySQL to access table pidGen directly
and get highestID for the $name_space.

Thanks,
Serhiy

Alan Stanley

unread,
May 2, 2012, 9:58:34 AM5/2/12
to island...@googlegroups.com
Heisenberg's uncertainty principal answers this one for us - the act of observation affects the outcome.  :-)

The increment is deliberate, it stops two users from trying to create objects with the same pid.

   Alan Stanley
   Lead Developer, Islandora Project
   Robertson Library, UPEI
   550 University Avenue, Charlottetown
   PE,  C1A 4P3



Reply all
Reply to author
Forward
0 new messages