Login Skip Navigation LinksWilsonORMapper > Forums Search
Demo Version Demo Version
Download and try for yourself a fully working demo version, including sample apps and documentation.  The only limitation is that the demo version only works inside the debugger.

PayPal Subscribe
Get It All for $50 USD:
WebPortal, ORMapper,
Source Code, All Updates
PayPal

User Login User Login
Log In
 
 
Reset Password

Wilson ORMapper Forums Wilson ORMapper Forums : Feature Requests : Aggregate Feature?

Date Post
3/9/2006 12:37:05 AM
Aggregate type attribute, something similar to a <lookup />, see psuedo example below:
 
<entity type="Customer" table="Customers" keyMember="id">
   <attribute member="firstName" field="fistName" />
   <attribute member="lastName" field="lastName" />
   ...
   <aggregate member="orderCount" aggregateType="COUNT|SUM|MAX|etc." childFieldToAggregate="order_id" type="Order" />
   ...
   <relation relationship="OneToMany" member="orders" field="customer_id" type="Order" ... />
   ...
</entity>
<entity type="Order" table="Orders" keyMember="id">
...
 
This would be faster than loading the "orders" collection and calling customer.Orders.Count property I would think.  Or instead of childFieldToAggregate, maybe use childMemberToAggregate or something?  I realize this can be accomplished by using a View, but not all views are updateable.  This member of course would be readonly.
 
 
 

Well aftering thinking about it more, I realize the data in said member would easily become dirty/outdated.  As the OneToMany collection data changed, this aggregate member's data would not without resyncing the entity.  :-( 
 
But thought I would throw this out there anyway.  It was one of those things that hit you in the shower.