logo       

Updating DB & objectid.next from outside DODS: msg#00047

java.enhydra.general

Subject: Updating DB & objectid.next from outside DODS

I have a Postgres database with a set of tables generated by DODS (enhydra 3.1). I would like to make updates to these tables from outside of DODS (in the specific case, from a C++ program). The DODS generated tables include the objectid and objectversion columns. Furthermore there is the objectid table whose "next" value needs updating as well.

My intuition suggests having my C++ program use objectid.next for the ObjectId in the newly inserted row and then increment objectid.next. Wrap this up on a locked transaction.

However, according to the docs, the class com.lutris.appserver.server.sql.standard.StandardObjectIdAllocator handles the maitenance of object ids, keeps a cache of them, etc. The docs for this class further assert "Object ids can only be created via this manager." I fear any DB operation I perform on object ids outside of DODS will screw things up.

Is there a more appropriate way to solve this problem?

Thanks,
--Sunil


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise