The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Extend GetHierarchicalProperties()

Last post 04-04-2008, 7:44 AM by David.Parsons. 1 replies.
Sort Posts: Previous Next
  •  04-03-2008, 7:11 AM 8689

    Extend GetHierarchicalProperties()

    Using ES2008, is there a way to extend this method in the custom classes?  I am looking to add a few more collections that are not enforced directly with foreign keys. 

    To illustrate, my ScheduledTasks table has two fields used to identify the type (EntityType) and the identifier (EntityID) of the entity the scheduled task relates to (User, Contact, Company etc.).  Since EntityType can vary, there is no FK relationship on EntityID, although there are constraints that ensure the entity exists based on the EntityType.

    What I'd like to do is add collections to the hierarchical properties for a given entity, like "ScheduledTasksByContactID" for example.  I've been able to accomplish this by either (a) editing the generated class' GetHierarchicalProperties() or (b) moving  GetHierarchicalProperties() to the custom class.  Neither of these bodes well for regenerating code though so I am wondering if there is a better way to accomplish this.  Maybe something akin to what we do for GetLocalBindingProperties()?

    Thanks in advance!

    Cheers,
    -Sean
     


     

  •  04-04-2008, 7:44 AM 8706 in reply to 8689

    Re: Extend GetHierarchicalProperties()

    There is no built-in way to do that. Adding domain modeling is one of the enhancements planned for ES2008, but is scheduled for much later in the year.

    http://community.entityspaces.net/forums/thread/8562.aspx


    David Neal Parsons
    www.entityspaces.net
View as RSS news feed in XML