Re: typed model with multiple classes

2018-09-07 Thread Jordan Zimmerman
No, not today. You would create two models, one for the /groups/{groupId} model 
and one for the user.

-JZ

> On Sep 7, 2018, at 12:31 PM, Hendrik Haddorp  wrote:
> 
> Hi,
> 
> is it possible to create a typed model that contains hierarchical objects of 
> different types? For example if I have user and group objects and want to 
> store them like this:
> /groups/{groupId}/users/{userId}
> 
> Using TypedModeledFramework I could set a type for the parameters in the 
> ZPath but the objects returned from the model are always the same. I would 
> like to get Group objects on the group level and User objects on the user 
> level. The objects should only contain data from their level.
> 
> I got this working by having two typed models and then only load data on the 
> correct position. This is however a bit error prone and if I would use a 
> cached model I would end up having all nodes in both caches. Thus I would be 
> interested in a better solution.
> 
> thanks,
> Hendrik



typed model with multiple classes

2018-09-07 Thread Hendrik Haddorp

Hi,

is it possible to create a typed model that contains hierarchical 
objects of different types? For example if I have user and group objects 
and want to store them like this:

    /groups/{groupId}/users/{userId}

Using TypedModeledFramework I could set a type for the parameters in the 
ZPath but the objects returned from the model are always the same. I 
would like to get Group objects on the group level and User objects on 
the user level. The objects should only contain data from their level.


I got this working by having two typed models and then only load data on 
the correct position. This is however a bit error prone and if I would 
use a cached model I would end up having all nodes in both caches. Thus 
I would be interested in a better solution.


thanks,
Hendrik