|
From: Gert T. <th...@ba...> - 2002-08-14 12:16:12
|
Thanks, but, > Instead of being an arrayref, you specify the ID in a comma-separated > string: > > $articlespecialprice =3D BaerShopSF::data::articlespecialprices->fetch= ( > "$a,$country,$currency" ); that helped. But your manual says "As of SPOPS 0.53, SPOPS::DBI supports multi-field primary keys. To use i= t,=20 you just use an arrayref to represent the ID field rather than a string.=20 (Wisenheimers who use an arrayref with one element may be shocked that SP= OPS=20 finds this attempt to trick it and sets the value to the single element.)= " Please don't mind, but that's weird. > You can look at t/31_dbi_multifield.t for more examples. I'm adding > documentation to SPOPS::DBI right now. > > > Why? Can you give some examples? > > > > 2) Relationships (has_a, links_to) > > > > How do has_a and links_to work? > > Can you give some examples? > > For 'links_to', please see 'perldoc SPOPS::ClassFactory::DBI'. > > For 'has_a'... wow, there's nothing there. My apologies. > > There are working examples of relationships in the eg/ directory: > My::Doodad has_a My::User, My::User links_to My::Group, My::Group > links_to My::User. Will lokk there asap. > I'll move the existing examples for 'links_to' and add new information > for 'has_a' to SPOPS::Manual::Relationships so they're in one place. Good idea. SPOPS is a very powerful piece of software. But as such it is as usable a= s=20 it's documentation complete :-( > Thanks for bringing these up. Thank you. Gert. |