|
From: Eric V. <er...@te...> - 2002-09-24 10:55:32
|
Hi,
I am a starter with SPOPS and I have a little problem with the links_to
option.
I have two tables, object and subobject. subobject has two
foreign keys, so that's two 'has_a' fields. Now I would like to give the
object table two links_to fields, but I can't figure out how to do
this.
This is wat I have right now:
'object' => {
class => 'My::object',
isa => [ qw{ My::base } ],
field => [ qw{
id
name
physical_object
}
],
strict_field => 'yes',
id_field => [ qw{ id } ],
no_insert => [ qw{ id } ],
no_update => [ qw{ id } ],
base_table => 'object',
increment_field => 1,
sequence_name => 'shared_ids',
}
'subobject' => {
class => 'My::subobject',
isa => [ qw{ My::base } ],
field => [ qw{
id
name
object_id_parent
object_id_child
}
],
strict_field => 'yes',
id_field => [ qw{ id } ],
no_insert => [ qw{ id } ],
no_update => [ qw{ id } ],
default_values => {
},
has_a => {
'My::object' => 'object_id_parent',
'My::object' => 'object_id_child',
base_table => 'subobject',
increment_field => 1,
sequence_name => 'shared_ids',
}
What should I add to the object definition to get these links_to
working?
--
#!perl # Life ain't fair, but root passwords help.
# Eric Veldhuyzen http://terra.nu/
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~ # er...@te...
/.(.)...(.)(.)....(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;` #Perl Monger
|