Steve
the attached sample maps a class (or table) DRL.STARDIETARY to the
lookup table in an appropriate way for use as SQL (or object) access to
the STARDIETARY lookup table.
As always, don't rely on my testing - it is only an example.
Dave
PS: For anyone unfamiliar with Ensemble storage, there is a default
mapping for classes or tables to the underlying data structures, which
allow you to forget all about it. They simply work out of the box. But
there are reasons why you might want to control that mapping. (The most
common is for support of legacy code.)
In this case, it was decided to by-pass SQL, store all look up tables in
the same structure (^Ens.LookupTable) and make it as fast as possible
for the source to target translation. That structure didn't match the
default class storage, but the storage section added here takes care of
it. If you define a storage definition similar to this, you can use SQL
and once again forget about the underlying structure.
David Loveluck
617 225 3122