[CDBI] Class::DBI and DESTROY

William Ross will at spanner.org
Thu Nov 10 16:42:33 GMT 2005


On 10 Nov 2005, at 13:15, Steven Mackenzie wrote:

> <snip>
> # use the configured card writer to write an index card for this CD

if I read this correctly, the more orthodox solution would be to  
include a 'writer' column in the CD (or more likely Genre) class and  
define a has_a relationship on that column that inflates to the  
appropriate Writer object and deflates back to whatever arbitrary tag  
you're using to identify it. Then you don't have to worry about  
uniqueness and destruction at all.

ALternatively  if your real situation is more complex - you might be  
able to work around these problems by making your card writers a set  
of singletons. If that isn't too contradictory.

.2p

will





More information about the ClassDBI mailing list