No offence, but that sounds like you don't know enough to design a good ERD.
You may join the dbix-class irc channel and discuss it before you make a 
design error you regret later.

-Alex

-----Original Message-----
From: Angel Kolev [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 13, 2007 8:08 AM
To: Class user and developer list
Subject: Re: [Dbix-class] all data at once

Because 50% of the time in our base they are family -
male+female+family, and they have same ID.

[EMAIL PROTECTED] wrote:
> Missing the point,  why not just a gender column and a person table?
>
> -Wade
>
> "Angel Kolev" <[EMAIL PROTECTED]> wrote on 12/12/2007 03:54:48 PM:
>
>
>> Nope :) That will manage our clients.
>>
>
>
>> 2007/12/12, Benjamin Hitz <[EMAIL PROTECTED]>:
>>
>> I am going to take a WFG, and say "Dating Site".
>>
>> Ben
>>
>>
>>> Why?
>>> Sounds like a *very* bad ERD!
>>>
>>> -Alex
>>>
>>>
>>> -----Original Message-----
>>> From: Angel Kolev [mailto: [EMAIL PROTECTED]
>>> Sent: Wednesday, December 12, 2007 4:15 PM
>>> To: Class user and developer list
>>> Subject: Re: [Dbix-class] all data at once
>>>
>>> Hi, i need genders in different tables. I forgot to notice, found
>>> solution for my problem:
>>>
>>> my $rs = $c->model('AppModelDB::Family')->search({family_id =>
>>> undef},{join     => ['female','male'],
>>>
>>>
>>> prefetch => ['female','male']
>>>
>>>                                                                });
>>> $rs->populate([{female=>{%females},%family,male=>{%males},}]);
>>>
>>>
>>> Hartmaier Alexander wrote:
>>>
>>>> Hi!
>>>>
>>>>
>>>>
>>>> Why isn't the gender a simple attribute but instead two different
>>>> tables?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From:* Angel Kolev [mailto:[EMAIL PROTECTED]
>>>> *Sent:* Saturday, December 08, 2007 4:37 PM
>>>> *To:* [email protected]
>>>> *Subject:* [Dbix-class] all data at once
>>>>
>>>>
>>>>
>>>> Hi, All. Im new in DBIx::Class and this is my first question here :)
>>>> I write catalyst app and use dbic for 3 tables (males,females,family)
>>>> with has_many and may_to_many. All works, but there are too many
>>>> requests to my database when i use this:
>>>>  my $rs = $c->model('AppModelDB::ClientMale')->search();
>>>> while (my $line = $rs->next) {
>>>>             push @{$families},[ $line->client_family->first->id,
>>>>                      make_family(
>>>>                                  $line->first_n,
>>>>                                  $line->family_n,
>>>>                                  $line->client_female->first-
>>>>
>>>>> first_n,
>>>>>
>>>>                                  $line->client_female->first-
>>>>
>>>>> family_n
>>>>>
>>>>                                 )
>>>>                 ,$line->client_family->first->city
>>>>                 ,$line->client_family->first->zip_code
>>>>                 ,$line->client_family->first->municipality
>>>>                 ,$line->client_family->first->street
>>>>                 ,$line->client_family->first->public_place_type
>>>>                 ,$line->client_family->first->public_place_name
>>>>                 ];
>>>>         }
>>>> }
>>>> $c->stash->{families} = $families;
>>>>
>>>> I wrote "export DBIC_TRACE=1" for debug and saw alot of screens with
>>>> SELECT requests to MySQL. Plese help me to optimize the code. Every
>>>> single table has around 190 lines.
>>>> Thank you
>>>>
>>>> ---------------------------------------------------------------------
>>>> ---
>>>>
>>>> _______________________________________________
>>>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>>>> IRC: irc.perl.org#dbix-class
>>>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>>>> Searchable Archive: http://www.grokbase.com/group/dbix-
>>>> [EMAIL PROTECTED]
>>>>
>>> _______________________________________________
>>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>>> IRC: irc.perl.org#dbix-class
>>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>>> Searchable Archive: http://www.grokbase.com/group/dbix-
>>> [EMAIL PROTECTED]
>>>
>>> _______________________________________________
>>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>>> IRC: irc.perl.org#dbix-class
>>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>>> Searchable Archive: http://www.grokbase.com/group/dbix-
>>> [EMAIL PROTECTED]
>>>
>> --
>> Ben Hitz
>> Senior Scientific Programmer ** Saccharomyces Genome Database ** GO
>> Consortium
>> Stanford University ** [EMAIL PROTECTED]
>>
>>
>>
>>
>> _______________________________________________
>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>> IRC: irc.perl.org#dbix-class
>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>> Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
>> rawmode.org
>> _______________________________________________
>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>> IRC: irc.perl.org#dbix-class
>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>> Searchable Archive:
>>
> http://www.grokbase.com/group/[EMAIL PROTECTED]
>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: 
> http://www.grokbase.com/group/[EMAIL PROTECTED]
>
>


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to