tony,

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.

(i use a mechanism quite similar to your Class::DBI::CGI, but older and 
crapper. i'm hanging on to it because it's iterative and allows several 
linked objects to be created at once based on prefixes in fieldnames)

thanks for the new version, btw.

will





On Monday, June 24, 2002, at 07:11 AM, Tony Bowden wrote:

>
>   Class::DBI is a simple database->object mapping system. Simply point
>   it at your database, set up some classes to represent your tables,
>   tell it the relationships between your tables, and let it handle all
>   the 'simple' SQL for you (more complex queries can be written in SQL).
>    [See http://poop.sourceforge.net/ for comparison with similar 
> modules]
>
> Version 0.89 of Class::DBI is the first version released to CPAN
> since 0.86. As such it contains many bug fixes and tweaks and a few
> new concepts.
>
> The biggest change is probably the might_have() method to set up 1 to
> 0/1 relationships.
>
> We also have a new (undocumented as yet) 'column_type' based on ideas 
> from
> Matthew Simon Cavalletto and Tatsuhiko Miyagawa which can auto_inflate
> values to objects.
>
> So, for instance:
>
>   __PACKAGE__->column_type(created => 'Date::Simple');
>
> would make the result of your $obj->created() call be a Date::Simple
> object rather than a plain string.
>
>
>
> Other fixes and enhancements include:
>     - better MySQL autoincrement code (fixes occassional problems
>        under mod_perl) [Thanks to Tatsuhiko Miyagawa]
>     - fix for hasa() and create() with modified accessor/mutator names
>       (Thanks to Schwern)
>     - handle primary/foreign key value of zero better
>        (reported by Jim O'Brien)
>     - brought delete triggers in line with documentation
>        (reported by Barry Hoggard, fixed by Tatsuhiko Miyagawa)
>     - deprecated many methods to avoid clashing with potential column
>        names. These will remain until shortly before version 1.0 but
>        will issue warnings if used.
>
> Available from CPAN, or
>   http://www.tmtm.com/CPAN/Class-DBI-0.89.tar.gz
>
>
> Tony
>
>
>
>
>
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Poop-group mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/poop-group

Reply via email to