emmettwalsh wrote:
Lets say we do what you say and have a User base class and then a producer and consumer subclass. I assume the @discriminating column would be the role_id in the user_role table (although how you specify this im not so sure).
There is probably going to be a correlation between a user's concrete class being producer or consumer and the roles they have in the role table, but the latter is not managed by the former -- i.e.: If you want to define roles to correlate with these different types of user, you'll still need those entries in the user_role table in addition to the discriminator column in the user table that lets us know which type of concrete Java object to create.
But what happens when a user (i.e. one row in the app_user table) has many roles associated with him ? For example the user could have the role ADMIN and PRODCUCER, what object would the row get mapped to then ? And would this stuff up the whole acegi rbac mechanism thats there already in appfuse 2 when we tinker with it?
A single user can still have all the roles you want, but according to the use case you described it is still impossible for a user to be both a producer and a consumer. If you want a single user to be able to be both, you can't expect the single getScheduleEntries() method you described earlier to be able to behave the way you specified. If you don't mind having two different methods, then you could do with a single user type.
p.s. I would be very interested in learning the annotations to use for your solution
I still use xdoclet tags, so I can't help here. -Dale --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
