bob wrote: > Hi, > > I am going over this this example to learn how to construct an eager- > loaded adjacency tree, > > http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/examples/adjacencytree/byroot_tree.py > > and I noticed that some of the keys in the "treenodes" table are given > long names in the table definition, and then shorter aliases in the > mapper. (eg. parent_node_id, parent_id, ...) I couldn't really > figure out whether this is necessary functional-wise. It would be > nice if I could just use shorter column names to begin with and skip > the extra aliases. Any thoughts on that?
There's no functional need for those. For shorter names, other options are: a) just use shorter column names or b) keep the long names as-is in the database but use short names in Python via the key='shortname' option to Column. The latter is a common strategy when you're stuck with a legacy schema. -j --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---