> "acts_as_*" are the metadata(such as tablename is the metadata for sql
> table, but acts_as_*  are the metadata for model) for ActiveRecord
> (rails ORM), which add an predefined set of methods to manipulate the
> model.
>
> For example, add a line to specify "acts_as_list" in model's metadata
> could put results in order and act as a list;
> "acts_as_tree" add some methods to play model like the tree structure.
>
> SQLAlchemy/TurboEntity didn't have such stuff currently, but its not a
> hard thing to warp a method to access SQLAlchemy/TurboEntity model in
> native python code.
>
> --
> Fred


To provide extra methods to implement "act_as" function,
I wonder if it's possible to inherit "Entity" class rather than declare
"act_as" in metadata?

For example:

class Book (List): # declare in class, multiple inheritance possible
    class turboentity:
        tablename = "book"

rather than:

class Book (Entity):
    class turboentity:
        tablename = "book"
        act_as = "List" # declare "act_as" in metadata


----
Fred


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to