in reply to Re: dbicdump and relationships
in thread dbicdump and relationships
-
Can you provide more details, so we could reproduce the problem? It works for me with sqlite:
This is being done against MySQL and here is an abbreviated version of the schema I'm using:
The relationship should be sector->has_many_subsector and subsector belongs_to sector. Here is a sanitized version of the config file for dbicdump:$ cat ../sql-src/schema.sql drop table if exists density; create table density ( density_id integer not null auto_increment primary key, density varchar(25) not null ); drop table if exists startype; create table startype ( startype_id integer not null auto_increment primary key, startype varchar(10) not null ); drop table if exists starsize; create table starsize ( starsize_id integer not null auto_increment primary key, starsize varchar(10) not null ); drop table if exists sector; create table sector ( sector_id integer not null auto_increment primary key, name varchar(80) not null ); drop table if exists subsector; create table subsector ( subsector_id integer not null auto_increment primary key, name varchar(80) not null default 'unnamed', location char not null default 'A', startx integer not null default 1, starty integer not null default 1, endx integer not null default 8, endy integer not null default 10, density integer not null references density(density_id), sector integer not null references sector(sector_id) );
and by the way use_moose doesn't seem to be doing anything. If I run dbicdump against that config file I see:$ cat schema.conf schema_class RPG::Traveller::DB::Schema use_moose 1 <naming> relationships v6 monikers v6 column_accessors v6 force_ascii 1 </naming> <connect_info> dsn dbi:mysql:host=mydatabasehost.mydomain.com;database=st +armapper user AUSER pass APASSWORD </connect_info>
and the grep shows: <code> $ grep -RE "belongs_to|has_many" . $$ dbicdump schema.conf Dumping manual schema for RPG::Traveller::DB::Schema to directory . .. +. Schema dump completed.
Any pointers would be appreciated.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: dbicdump and relationships
by Anonymous Monk on Jan 14, 2013 at 14:33 UTC | |
by Anonymous Monk on Jan 14, 2013 at 14:36 UTC | |
by blue_cowdawg (Monsignor) on Jan 14, 2013 at 14:51 UTC | |
by Anonymous Monk on Jan 14, 2013 at 14:54 UTC | |
Re^3: dbicdump and relationships
by zwon (Abbot) on Jan 14, 2013 at 15:01 UTC | |
by blue_cowdawg (Monsignor) on Jan 14, 2013 at 15:13 UTC | |
by Anonymous Monk on Jan 14, 2013 at 15:18 UTC | |
by blue_cowdawg (Monsignor) on Jan 14, 2013 at 15:46 UTC |
In Section
Seekers of Perl Wisdom