Forum OpenACS Development: Acs_object_types table_name

Collapse
Posted by Kevin Crosbie on
Hi all,

I was just wondering if anyone knew the reason why the table_name
column on acs_object_types is unique.  Is it not possible to have
two objects which use the same table to store their data.  For
instance:

I have two types of users:  Users who can login and users who can't
and I just want to store some details for them.

That is: real_users and pseudo_users

Real_users are a sub-type of users and pseudo_users a sub-type of
persons.

They both store my user specific information such as number of
children etc. in the same table.

I suppose I could just have them both created as the same object
type... bit restrictive I think though.

Any ideas?

Collapse
Posted by Don Baccus on
Well ... also you *must* give a table.  Another way to do what you want would be to derive real_users and pseudo_users from users and define no new table for either type, adding columns to your shared user table instead.  I find this latter inability to define a type without additional storage to be more annoying but you're not the first to make the suggestion you're making, either.

I think both of these possible changes are on the table for OpenACS 4.7, but not 4.6.

Collapse
Posted by Kevin Crosbie on
I've taken your suggestion Don,  Thanks.  That should work fine for me.  Basically when I create a psuedo_user, I create a person, of type person and then add in the user specific data.  Then when I create a real_user, I create a user and add a specific type of user.

It is a little restrictive in the overall object model design though.  I'm sure there is a good reason to have that set to unique/not-null.

Anyway,

Thanks again,

Kevin