How can I get a database/environment/subindex Transaction?

I need to be able to get the transaction being an EntityIndex.  It is possible when you're a PrimaryIndex or a SecondaryIndex, but seems impossible when its subindex, because the implementation is private, it is impossible to ask "instanceof subindex", and because the instance exposes not his SecondaryIndex, that could be requested for the handle of the database get the environment for the current transaction.

More generally, it would be well for CurrentTransaction to have a method that takes an EntityIndex or a database, instead of making the user manually search for the environment.

Hello

Addition of EntityIndex.getDatabase seems very reasonable. With this you can write a method of static practice for database of transaction prices, if you wish.

Normally we cannot change this quickly, but in this case, it took less time to write the code that, in order to plan for a future release. :-) It will be in the next version, which is expected to ship by the end of November.

-mark

Tags: Database

Similar Questions

Maybe you are looking for