On Thu, Aug 5, 2010 at 10:56, sylvain ferriol <[email protected]> wrote:
> hello
> with the following code:
>
> class toto(elixir.Entity):
> ... class tutu(elixir.Entity):
> ...
>
> elixir creates the following tables:
> __main___toto
> __main___tutu
>
> why it does not create __main___toto__tutu instead ?
I don't think people would want that behavior by default. You can
probably achieve this with a custom tablename function:
def myfunc(entity):
# inspect stack frame
return "whatever fancy name you want"
class MyBase(elixir.entity):
using_options(abstract=True)
using_options_defaults(tablename=myfunc)
class toto(MyBase):
class tutu(MyBase):
pass
Hope it helps,
--
Gaëtan de Menten
--
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.