You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mark Neighbors <mn...@visualanalytics.com> on 2003/02/25 08:02:29 UTC
Can PersistenceBroker report queries be used within ODMG?
I see the new support for projectionAttributes in oql-ojb.g that generates pb report queries.
Got an example to work.
I see OQLQueryImpl.execute calling performLockingIfRequired but only for collection queries.
Is there a way to coordinate report queries with odmg locking?
Perhaps by
(1) getting the LockMap from the LockMapFactory
(2) retrieving the id in the report query
(3) creating a temp object of the corresponding persistent class with just the id
(4) caling LockMap.getWriter passing in the temp object
(5) if null is returned then object is not write locked?
This seems to work.
Thanks in advance,
Mark
Re: Can PersistenceBroker report queries be used within ODMG?
Posted by Thomas Mahler <th...@web.de>.
Hi Mark,
Mark Neighbors wrote:
> I see the new support for projectionAttributes in oql-ojb.g that generates pb report queries.
> Got an example to work.
>
> I see OQLQueryImpl.execute calling performLockingIfRequired but only for collection queries.
>
> Is there a way to coordinate report queries with odmg locking?
>
> Perhaps by
>
> (1) getting the LockMap from the LockMapFactory
> (2) retrieving the id in the report query
Only if there is a primary key returned by the report query. (In general
report-queries need not return any PK columns)
> (3) creating a temp object of the corresponding persistent class with just the id
Only if the query corresponds to a persistent class (report queries
could just be any SELECT statement)
> (4) caling LockMap.getWriter passing in the temp object
> (5) if null is returned then object is not write locked?
>
> This seems to work.
If my two constraints are fulfilled this is OK. If not we are in trouble.
cheers,
Thomas
>
> Thanks in advance,
> Mark
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>