On Tue, Jun 25, 2002 at 08:46:47AM +0000, william ross wrote:
> i notice that defining a relationship with might_have doesn't add a 
> column to $class->__hasa_columns. is that something you're likely to 
> change? it's enormously useful for me to be able to define relationship 
> columns which might not be occupied - eg person foo might_have a mugshot 
> in the images table - but at the moment i don't think i can use it 
> because my input functions depend on reading $class->columns and 
> attempting to fill the vacancies that defines.

Hmmm... might_have works slightly differently from hasa, so I'm slightly
reluctant to start adding its information into the __hasa_columns info.
I have a sneaky suspicion that doing this would cause cries of horror
from other people who manipulate this information for some other
purpose.

What I need to do for some other project is have a way of asking a
Class::DBI class for some information about itself - what columns it
has, what relationships it has etc. If there was a good interface to
this would that do what you need?

Has anyone any suggestions for how this should operate?

Tony

Reply via email to