Re: [Catalyst] More natural access to model?

2009-06-05 Thread Paweł Tęcza
Darren Duncan pisze: > Paweł Tęcza wrote: >> Yes, I'm trying to think about my data as about the objects with >> attributes and create simple and flexible database without data >> redundancy. For example, I have tables for users and their roles, >> studies, units, r

Re: [Catalyst] More natural access to model?

2009-05-15 Thread Paweł Tęcza
Darren Duncan pisze: > Paweł Tęcza wrote: >> Intriguing post. My application and database design are still under >> heavy development, so all ideas, suggestions and comments are very >> welcome :D > > A general rule of thumb is that you should be conceptualizing your

Re: [Catalyst] More natural access to model?

2009-05-12 Thread Paweł Tęcza
Dnia 2009-05-12, wto o godzinie 19:30 +0100, Matt S Trout pisze: > Well, that's a horrible idea. > > The whole point of having a database is to -model- your data. > > If you try and turn it into a giant hash, then of course you're going to > end up with nasty code. > > I -could- explain how to

Re: [Catalyst] More natural access to model?

2009-05-12 Thread Paweł Tęcza
Tomas Doran pisze: > Paweł Tęcza wrote: >> Thank you very much for your response! Is it a way to autogenerate all >> necessary subroutines in a loop or I need define all of them manually? >> They should have very similar body :) > > Here is the gross method: > &g

Re: [Catalyst] More natural access to model?

2009-05-12 Thread Paweł Tęcza
Kieren Diment pisze: > On 12/05/2009, at 8:57 PM, Paweł Tęcza wrote: > >> >> Do you know solution of that issue? Maybe I should define >> subroutines in >> MyApp::Schema::ResultSet::Studies module for all type of data? >> > > Yes you should. That

Re: [Catalyst] More natural access to model?

2009-05-12 Thread Paweł Tęcza
Zbigniew Lukasiak pisze: > 2009/5/12 Paweł Tęcza : >> So my question is: how can I modify my model to get the study details >> in the following, more "natural" way? Is it possibble at all? >> >> my @studies = $c->model('DB::Studies')->all; &

[Catalyst] More natural access to model?

2009-05-12 Thread Paweł Tęcza
Dear Catalyst users, It's my first post here, so I would like to say "Hello" to all of us! :) I'm writing my first Catalyst application for student registration and I have the following tables for details about studies at our university: CREATE TABLE studies ( id integer NOT NULL, unit_i