This may have been answered elsewhere, but I haven't found it...
When I began a project some time ago, Elixir was on 0.3. At that
time, it was possible to do something like this:
<code>
class MyOuterClass(Entity):
# has_field definitions
# set up some self.external_definitions lookup
def dynamic_table(self, table_name=None):
class TemporaryTable(Entity):
for field_name, field_type in
self.external_definitions:
has_field(field_name, field_type)
return TemporaryTable
</code>
The reason for doing this was that we were regularly loading old
VisualFoxPro DBF files into a database, a dozen or more at a time for
different clients, and they would update these, and want new ones
loaded, etc. It wouldn't be possible to create new *real* classes in
code every time they had a new table to be loaded, so with dbfpy and
some wrapper logic, we generated these temporary wrappers.
In attempting to upgrade to the later versions of Elixir however, it
seems like we've run into a problem. Elixir sets up and establishes
all of the Entity hooks on the first run through, and our
TemporaryTable class won't connect now. I'm assuming there has to be
a way to make this work though. I'm at work right now and don't have
the code in front of me, but if this isn't making sense, I can send
along the full traceback later this evening. If this is a "known
issue" though, or there's an obvious reason why this won't work that
I'm missing, that'd be excellent.
Thanks for any thoughts!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---