Re: [RDBO] "closing dbh with active statement handles" still a problem?

2008-02-12 Thread Michael Lackhoff
On 12.02.2008 07:56 [EMAIL PROTECTED] wrote: > I get a > > closing dbh with active statement handles at ...Rose/DB.pm line 832. > > warning at the end. As > > > http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/msg02234.html > > indicates, this was attributed to DBD::SQ

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.7663 released

2008-02-05 Thread Michael Lackhoff
On 04.02.2008 21:41 John Siracusa wrote: > More bug fixes that I didn't want to wait until the next major release. I get this test failure with 0.7663: Test Summary Report --- t/db-object-loader-8.t (Wstat: 65280 Tests: 19 Failed: 16) Failed test number(s): 4-19

Re: [RDBO] good way to handle empty fields?

2007-12-15 Thread Michael Lackhoff
On 16.12.2007 02:05 John Siracusa wrote: > On Dec 15, 2007 10:43 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >> I guess, what you are talking about is done here: >> $form->init_fields_with_cgi($self->query). > > What is $self in that line? My (CGI::)Ap

Re: [RDBO] good way to handle empty fields?

2007-12-15 Thread Michael Lackhoff
On 14.12.2007 19:12 John Siracusa wrote: > I think your problem is at a level higher: it's the thing feeding your > params() to the form. If you've decided that an empty text field > should result in an undef field value, then the piece of code you have > that converts from a query string like "a

Re: [RDBO] good way to handle empty fields?

2007-12-14 Thread Michael Lackhoff
On 14.12.2007 09:21 Darren Duncan wrote: > If you have a place that holds a value, it should always hold a > value. If you don't know a value for a place or a value isn't > applicable there, then the place shouldn't exist at all. > > The more correct way to do this which SQL supports is throug

Re: [RDBO] good way to handle empty fields?

2007-12-13 Thread Michael Lackhoff
On 13.12.2007 14:03 John Siracusa wrote: > On Dec 13, 2007 4:24 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >> When I create a record with such a field, it is usually NULL but >> after some editing with the help of RHTMLO the empty field value could >> become '

[RDBO] good way to handle empty fields?

2007-12-13 Thread Michael Lackhoff
Hello, perhaps this is related to the new "undef_sets_null" but I am not sure. The problem: I have some fields where it is important if they are "empty" or not. Now "emptyness" is not so easy in SQL as we all know, it could be '' or 0 or NULL. When I create a record with such a field, it is usuall

[RDBO] More on Oracle::Proxy

2007-09-03 Thread Michael Lackhoff
Hello, I did some more tests and it looks as if everything works as it should but RDBO still gives an error. This is from a DBI->trace: <- fetch= [ '[EMAIL PROTECTED]' 'ZBMED' 'K002054024' 'mysecret' ] row1 at Object.pm line 385 <- rows= '0E0' at Object.pm line 387 <- finish= 1 at Obje

[RDBO] Proxy working now but Oracle not quite

2007-08-29 Thread Michael Lackhoff
Hello, Shame on me, I had forgotten to add a mapping of the driver to the Oracle::Proxy class, now it is working. After I got the connection I first tried to use the loader to create all the classes for me but that didn't work. I don't know if the reason is the proxy or RDBO because I couldn't te

Re: [RDBO] How to register a db using DBI::Proxy?

2007-08-29 Thread Michael Lackhoff
On 09.08.2007 13:42 John Siracusa wrote: > On 8/9/07 6:13 AM, Michael Lackhoff wrote: >> I get this error message: >> Attempt to change driver from 'oracle' to 'proxy' detected. The driver >> cannot be changed after object creation. at test02.pl line 8

Re: [RDBO] Still fighting with transactions

2007-08-17 Thread Michael Lackhoff
On 17.08.2007 22:53 John Siracusa wrote: >> So, if I understand it right, there are really two problems: >> - no rollback when it should be (my do_transaction above) >> - a rollback when there should be none (your warn) > > Once the database handle is reset to auto-commit, any subsequent > rollba

Re: [RDBO] Still fighting with transactions

2007-08-17 Thread Michael Lackhoff
On 17.08.2007 16:20 John Siracusa wrote: > On 8/15/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >> my $db = My::DB->new(); >> >> $db->do_transaction( >> sub { >> my $o = My::Thing->new(); >> $o->

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Michael Lackhoff
On 15.08.2007 18:47 Perrin Harkins wrote: > I have a guess. Looking at the new code in Apache::DBI, I see that it > now tries to reset the state of the $dbh every time you call > connect(). This probably breaks the begin_work() state. > > I'm not sure why this was added, since it seems like thi

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Michael Lackhoff
On 14.08.2007 22:43 John Siracusa wrote: > On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >> On 14.08.2007 20:34 John Siracusa wrote: >>> On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >>>> $db->begin_work; >>>> my

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 20:37 Bill Moseley wrote: > On Tue, Aug 14, 2007 at 08:28:40PM +0200, Michael Lackhoff wrote: >> > Have you also looked at Roes::DB's do_transaction() ? >> >> I know that this is another possible variant but because there is so >> much code I didn

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 20:34 John Siracusa wrote: > On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: >> $db->begin_work; >> my $obj = Products->new(db => $db); >> ... >> $obj->save; >> some_helper_that_uses_db(); # rollback here >> my $obj2 =

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 20:20 Bill Moseley wrote: > On Tue, Aug 14, 2007 at 11:57:27AM +0200, Michael Lackhoff wrote: >> my $db = MyApp::DB->new; >> $self->my_db($db); # a new db for a new transaction >> $db->begin_work; # Start transaction >> >> ... create two

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 18:54 Perrin Harkins wrote: > On 8/14/07, John Siracusa <[EMAIL PROTECTED]> wrote: >> The simplest way to do this is to leave everything as per the >> defaults, and just use Apache::DBI. > > Note that Apache::DBI also does the automatic rollback for you, but > only if you have AutoC

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 17:50 Perrin Harkins wrote: >> do you have any pointer on how this is done (correctly)? > >$r->push_handlers(PerlCleanupHandler => sub { >MyApp::DB->rollback(); >}); Thanks! That's exactly what I needed. I found already that there is a PerlCleanupHandler directive i

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
On 14.08.2007 16:54 Perrin Harkins wrote: >> $db->begin_work; # Start transaction >> die "Does it roll back?"; >> $db->commit; > > I don't see any rollback there. It's a common practice to put an Well, my understandig was that if perl dies within a transaction it (or DBI) would do a rollback,

[RDBO] Still fighting with transactions

2007-08-14 Thread Michael Lackhoff
Hello, I thought I understood how to organize several write operations within a transaction but it still doesn't work the way I do it. Here is what I have so far: In my base class: sub init_db { my $self = shift; my $db; if (not $self->my_db) { $self->my_db( MyApp::DB->new() )

[RDBO] How to register a db using DBI::Proxy?

2007-08-09 Thread Michael Lackhoff
Hello, I am trying to use Rose::DB for a new project that uses an Oracle database but the connection is done with DBI::Proxy (then I don't have to install DBD::Oracle on every machine that accesses the database) After reading the docs the best I could manage was this: My::DB->register_db( dom

Re: [RDBO] DBD::SQLite and active statement handles.

2007-08-02 Thread Michael Lackhoff
On 01.08.2007 17:43 George Hartzell wrote: > I think we may have gone over this, but I can't find it in the list. > > I'm using current versions of Rose::DB::Object and friends on a > Freebsd -STABLE system. I'm using sqlite 3.3.17 and DBD::SQLite 1.13. I cannot say anything about your particul

[RDBO] delete cascade only one level deep?

2007-07-28 Thread Michael Lackhoff
Hello, after some problems with broken relationships I tried to use delete with the cascade option. I found two problems with cascade: - if multiple relationships point to the same table, the delete is executed more often than necessary (once for each relationship) This is not really a problem

[RDBO] many to many to arbitrary tables?

2007-07-02 Thread Michael Lackhoff
Hello, I would like to have the possibility to link from one record to other records in many other tables, something like this: in table dates: id = 1 when = 2007-07-04 14:00 ... some more fields a mapping table would look like this: date_id = 1 link_id = 5 link_table = customers date_id = 1

Re: [RDBO] missing column aliases in recent version(s)

2007-07-02 Thread Michael Lackhoff
John Siracusa wrote: > Okay, I've made the change in SVN. RDBO 0.765 will have tN table > aliasing on by default, even for queries that only involve a single > table. The new table_aliases Manager parameter can be used to force > the old behavior. Thanks! -Michael

Re: [RDBO] missing column aliases in recent version(s)

2007-06-30 Thread Michael Lackhoff
On 30 Jun 2007 at 17:10, John Siracusa wrote: > Tables are only aliased as tN when more than one table is involved in > the query. This "more than one" count does not include literal > subqueries like yours, however. I'm thinking of changing it in 0.765 > so that the tN aliases are always used,

[RDBO] missing column aliases in recent version(s)

2007-06-30 Thread Michael Lackhoff
Hello, I just stumbled upon a changed behaviour that causes my app to crash with RDBO 0.764 (works with 0.758). The problem occurs in a method that should give me all the groups a user (therapeut in my case) is not in: sub notingroups { my $self = shift; my $nr = $self->nr; # user id

Re: [RDBO] How to get transactions right

2007-06-27 Thread Michael Lackhoff
On 27 Jun 2007 at 9:45, John Siracusa wrote: > > And if it works in principle do I have to stuff the $dbh manually into every > > RDBO object or does it "just work" because Apache::DBI takes care that RDBO > > gets the right (perhaps reused) handle even if RDBO always requests a fresh > > one? >

Re: [RDBO] How to get transactions right

2007-06-27 Thread Michael Lackhoff
David, > > If yes, my question is, how all the RDBO internals work with such a setup. > > If I remember correctly > > RDBO wraps complex saves or deletes within a transaction. Would this lead > > to something like > > nested transactions? Is this possible at all, with sqlite (I am using now)

[RDBO] How to get transactions right

2007-06-27 Thread Michael Lackhoff
Hello, I read quite a lot recently about Apache::DBI, transactions and the problems that might occur but I must say that I am more confused than before as to what this all means for my RDBO project. It is a web app with lots of database activity (read and write). So performance and data integ

Re: [RDBO] cache object for later use within a mod_perl request cycle

2007-06-22 Thread Michael Lackhoff
On 22 Jun 2007 at 10:03, Perrin Harkins wrote: > On 6/22/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > > Thanks for the hint! This almost did it. Some tests showed that I had > > to use the connection-variant of pnotes in my setup: > > > > use Apache

Re: [RDBO] cache object for later use within a mod_perl request cycle

2007-06-21 Thread Michael Lackhoff
On 20 Jun 2007 at 13:40, Perrin Harkins wrote: > On 6/20/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > > Is this possible? I tried $r->dir_config(user_obj => $rdbo_user_obj); from > > the mod_perl > > documentation but that didn't work. > > I

[RDBO] cache object for later use within a mod_perl request cycle

2007-06-20 Thread Michael Lackhoff
I am using Apache2::AuthCookie for my authentification and authorisation. For both I have to get the user record from the database. For authorisation I have to do an additional lookup for an ordinary item that is requested by the user. I need this record to check e.g. if the requested item and

[RDBO] Relationship with complex mapping

2007-05-11 Thread Michael Lackhoff
Hello, I had to change a relationship from a simple ID to ID relationship to one that also includes a second ID. Worse still the second ID is not a column in one of the relationship partners but has to be taken from a record two steps up the hierarchy. Perhaps I will change the table to include

Re: [RDBO] Integration with Rose::HTML::Form

2007-01-31 Thread Michael Lackhoff
On 31 Jan 2007 at 8:52, John Siracusa wrote: > I don't use CGI::Application, so maybe I'm misunderstanding how it works, > but how about a class method that returns the current CGI::Application > object? e.g., MyWebSite->current_app(). You'd set it at the beginning of > each request. Then, in y

Re: [RDBO] Integration with Rose::HTML::Form

2007-01-31 Thread Michael Lackhoff
On 30 Jan 2007 at 17:00, John Siracusa wrote: > id is in $session, which the form knows nothing about. But in most > web app frameworks, there's usually some way to get at "globally > applicable" data like the session, in which case it's reasonable for > customer_from_form() to return you an obje

Re: [RDBO] How to do locking with RDBO?

2006-12-06 Thread Michael Lackhoff
Thanks guys for all the help, I'll have something to digest now and learned already a lot! Just a short reply to the ORM versus SQL issue: Yes you are right, you have to pay for the abstraction but then, if you manage to fit it all in, it pays off. I can see it with lots of scripts I developed f

Re: [RDBO] How to do locking with RDBO?

2006-12-05 Thread Michael Lackhoff
On 5 Dec 2006 at 11:02, Perrin Harkins wrote: > You can usually do this kind of ++ thing in one INSERT...SELECT statement: > > INSERT INTO invoice (id) SELECT MAX(id)+1 FROM invoice; That's clever! Though it seems to slightly defeat the point in using RDBO: To have Perl, classes and methods ins

Re: [RDBO] How to do locking with RDBO?

2006-12-05 Thread Michael Lackhoff
On 5 Dec 2006 at 10:32, John Siracusa wrote: > >> sub generate_invoice_number > >> { > >> my $class = shift; > >> my $db = My::DB->new; # Rose::DB subclass > > > > Why not just use the default here? > > What default? The one that is inherited from my common base class (I fol

Re: [RDBO] How to do locking with RDBO?

2006-12-05 Thread Michael Lackhoff
Hello John, many thanks for your help, the only part I don't understand is why I need a new DB object: > sub generate_invoice_number > { > my $class = shift; > my $db = My::DB->new; # Rose::DB subclass Why not just use the default here? > my $num; > > eval >

Re: [RDBO] How to do locking with RDBO?

2006-12-05 Thread Michael Lackhoff
On 5 Dec 2006 at 8:41, Sean Davis wrote: > > Is there an idiom for this kind of task? And how can I do it with RDBO? > > (I did a search for 'lock' in the docs and didn't find anything) > > Are you using postgresql? If so, could you use a sequence and set the > sequence back to 1 at a specified

[RDBO] How to do locking with RDBO?

2006-12-05 Thread Michael Lackhoff
Hello, I need some pseudo-unique numbers like invoice numbers. They start every year with 1, so autoincrement won't work. My idea was to use a helper table with just just two fields 'year' and 'last_used_number'. Is it enough to create a two column unique key or would it be better to do something

Re: [RDBO] How to do hierarchical defaults right?

2006-09-06 Thread Michael Lackhoff
On 5 Sep 2006, John Siracusa wrote: > As for the uniqueness issue, if the combination really is > unique, then why not add a unique key to the database and the class? > Then you can load() speculatively instead of doing a Manager query. That's what I was looking for. Thanks for the hint, I didn't

[RDBO] How to do hierarchical defaults right?

2006-09-04 Thread Michael Lackhoff
Hello, in my application I have a hierarchy of company, organisational unit and sub-unit. Some data should be configurable on every level but not compulsory on every level. If it is not defined for the sub-unit it should be taken from the unit and if it is not there from the company. An examp

[RDBO] Test failures in recent Rose::DB's

2006-08-12 Thread Michael Lackhoff
Hello, I just wanted to be up to date again and noticed that the oracle test files both have tests => 22 instead of 53, leading to a test failure. With the numbers corrected all tests pass. Cheers, Michael - Using Tomcat

Re: [RDBO] [semi-OT] Adding version control to RDBO objects

2006-05-29 Thread Michael Lackhoff
On 29 May 2006 at 13:21, Svilen Ivanov wrote: > I would like to extend RDBO to support versioning of properties for each > instance. To explain it better I will use analogy with CVS: > * calling "->save" will make new revision of the object ("cvs commit") > * "->load(id=>1)" will get

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.724 released

2006-05-16 Thread Michael Lackhoff
On 16 May 2006 at 9:28, John Siracusa wrote: > Yeah, I've been debating requiring DBD::SQLite 1.11 or later. SQLite > in general has problems correctly honoring multi-column ORDER BY > clauses, even when using the sqlite3 command-line tool. I'm not sure > how or why using a newer version of DBD:

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.724 released

2006-05-16 Thread Michael Lackhoff
Hi Ron, > I have DBD::SQLite V 1.09 installed. V 1.12 won't install under Windows. > After installing V 1.11, I re-ran the Rose::DB::Object install. The errors > above > disappeared. You can get a ppm of v 1.12 from the Canadians: ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-SQLite.ppd Wor

Re: [RDBO] list_tables in Oracle

2006-05-11 Thread Michael Lackhoff
Hi Ron, > > You can get the free express edition here: > > http://www.oracle.com/technology/software/products/database/xe/index.h > > tml > > Thanx. > > Can you access this Oracle from Perl? I didn't try yet. Privately I use SQLite or MySQL and at work we have a "normal" version. The reason,

Re: [RDBO] list_tables in Oracle

2006-05-11 Thread Michael Lackhoff
On 10 May 2006 at 20:13, John Siracusa wrote: > On 5/10/06 7:20 PM, LU, ZHENYUAN [AG/1000] wrote: > > I am using Oracle. > > Unfortunately, Rose::DB does not yet support Oracle. What you're using is > the "generic" interface that Rose::DB falls back to when it encounters an > unknown database. >

Re: [RDBO] Thoughs on changing add_ behaviour to make it more useful?

2006-05-11 Thread Michael Lackhoff
On 10 May 2006 at 17:39, John Siracusa wrote: > On 5/10/06, Jesse Brown <[EMAIL PROTECTED]> wrote: > > I guess the question I should ask is: Why NOT return the newly created > > objects? > > I just like to know the reasoning before I change the API :) The code > examples are exactly what I was

Re: [RDBO] How to copy an object?

2006-05-05 Thread Michael Lackhoff
On 5 May 2006, John Siracusa wrote: > There's no way around copying every field when making a copy! :) That's > just what RDBO's (undocumented) clone() method does. It's not documented > because I'm not sure if it does everything that a clone method should do. > You can be the first to try it an

[RDBO] How to copy an object?

2006-05-05 Thread Michael Lackhoff
Hello John, thanks for your help on my "negative groups" question. I used the manager method as you suggested and it is working fine now! But as you might have guessed by now I ran into a new problem. (By the way, if I am asking too many questions just stop me. Then I will only ask again when I

[RDBO] How to negate a many to many relationship?

2006-05-03 Thread Michael Lackhoff
Hello, I seem to have particular problems with negative thinking ;-) Well, here is the problem: I use a many to many relationship to define group membership of users. So I have three tables 'users', 'groups' and 'groupmappings' and a relationship definition that looks like this (within the User

Re: [RDBO] Problem with many to many relationship under mod_perl (solved)

2006-05-01 Thread Michael Lackhoff
On 30 Apr 2006, John Siracusa wrote: > I can't think of any reason this would behave any differently under > mod_perl. You are right. Sorry, it was another one of these silly mistakes. I have two perl installations, one as a "normal" installation and another one that came with apache, this is t

[RDBO] Problem with many to many relationship under mod_perl

2006-04-30 Thread Michael Lackhoff
Hello, I am trying to write an authorization handler in mod_perl and got a very strange behaviour. What I want to achieve is use the group memberships stored in a database that is handled by RDBO to restrict access to some parts of my application. This script works perfectly well when run from

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.70 released

2006-04-08 Thread Michael Lackhoff
On 4 Apr 2006, John Siracusa wrote: > Rose::DateTime: > > 0.52 (04.04.2006) - John Siracusa <[EMAIL PROTECTED]> > > * Allow negative and fractional epoch values in parse_date(). > * Fixed a bug in the -mm-dd date parsing that caused it to > incorrectly match 10-digit seconds-s

Re: [RDBO] negative relationships?

2006-03-25 Thread Michael Lackhoff
Just for the record, I found it. > >> 'NOT EXISTS (SELECT * FROM products p WHERE p.vendor_id = id)'; > >> > >> $vendors = Vendor::Manager->get_vendors(clauses => [ $subselect ]); > > > > This doesn't work for me (result list is empty but should have two > > entries). If I change the

Re: [RDBO] negative relationships?

2006-03-25 Thread Michael Lackhoff
Hello John, I did some more testing, got it working but still don't understand everything. > This should work: > > $vendors = > Vendor::Manager->get_vendors( > with_objects => [ 'products' ], > query=> [ 'products.vendor_id' => undef ]); Yes, this works fine.

Re: [RDBO] negative relationships?

2006-03-24 Thread Michael Lackhoff
On 24 Mar 2006, John Siracusa wrote: > Both of the above approaches should be possible in a relationship > method by using the manager_args and query_args relationship > parameters. Many, many thanks! It is really great how all of you help a poor little newbee like myself ;-) Cheers, Michael

Re: [RDBO] negative relationships?

2006-03-24 Thread Michael Lackhoff
On 24 Mar 2006, Cees Hek wrote: > SELECT vendors.* FROM vendors LEFT JOIN products ON (vendors.id = > products.vendor_id) WHERE products.id IS NULL; Thanks a lot, that works great! > A left join will always grab all matching records from the left table, > even if it doesn't have matching record

[RDBO] negative relationships?

2006-03-24 Thread Michael Lackhoff
Say, I have two tables: vendors and products. Now I want a list of all the vendors that have no products yet. This can be seen from the products table if there are no records with the vendor_id of the vendor in question. Is this possible with a 'normal' manager method or with a relationship or d

Re: [RDBO] Problem with many to many mapping table

2006-03-15 Thread Michael Lackhoff
On 15 Mar 2006, John Siracusa wrote: > Whoops, that looks like a bug. Try the version in SVN and tell me if it > fixes your problem: > > svn co https://svn.sourceforge.net/svnroot/rose/trunk/modules/Rose-DB-Object Now everything seems broken: First I got some test failures in db-object-loader-5

[RDBO] Problem with many to many mapping table

2006-03-15 Thread Michael Lackhoff
Hello again, I tried to add a 'many to many' relationship between two of my classes. I followed the tutorial and everything works as long as I define foreign_keys for the mapping table: __PACKAGE__->meta->foreign_keys( therapeut => { class => 'PVonline::Therapeuten',

Re: [RDBO] sorted relationship output?

2006-03-14 Thread Michael Lackhoff
On 14 Mar 2006, Uwe Voelker wrote: > $meta->relationships > ( > changes => {type => 'one to many', > class=> 'Changes', > column_map => {ID => 'AUFTRAG'}, > manager_args => {sort_by => 'CHANGES.DATUM DESC'}, >

Re: [RDBO] sorted relationship output?

2006-03-14 Thread Michael Lackhoff
On 14 Mar 2006, John Siracusa wrote: > On 3/14/06 4:17 AM, Michael Lackhoff wrote: > > Is it possible to either define a default sort_by clause in the > > relationship definition > > See Uwe's earlier response for how to do this. Yes, that works great. Thanks! &g

[RDBO] sorted relationship output?

2006-03-14 Thread Michael Lackhoff
I just discovered the power of the relationship definitions. It is so easy to create a tree of one to many relationships. There is only one problem: they are unsorted. Is it possible to either define a default sort_by clause in the relationship definition or when the relationship method is actual

[RDBO] something for the wishlist

2006-03-14 Thread Michael Lackhoff
You might remember my mistake with the definition of a field that differed between the "create table..." statement for the database and the RDBO-class. I think it is always error prone to have two such definitions around. So woudn't it be great if it was possible to maintain only the class defi

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-28 Thread Michael Lackhoff
On 28 Feb 2006 at 7:42, John Siracusa wrote: > What I was talking about was a convenience method to fill a Rose::HTML::Form > based on a CGI object. Then you'd use Rose::HTML::Form's existing > object_from_form() method to fill in the arbitrary object. Something like: Hmm, then I think it won'

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-27 Thread Michael Lackhoff
On 21 Feb 2006, John Siracusa wrote: Thanks for your answer and sorry for my late reply, I couldn't work on my project for a few days. > Ah, okay. For the record, I use an object-based approach to this kind of > thing by using Rose::HTML::Objects to manage my forms. Anyway, getting a > hashref

Re: [RDBO] Re: cannot find sets that are clearly there

2006-02-21 Thread Michael Lackhoff
On 21 Feb 2006, John Siracusa wrote: > SQLite really has no concept of SQL data types. Well, it has a very > simplified concept, anyway. All that detail you put in your CREATE > TABLE statements is pretty much ignored by SQLite. Instead, it stores > everything as strings and integers (and maybe

[RDBO] Re: cannot find sets that are clearly there

2006-02-21 Thread Michael Lackhoff
Hello again, I found out about my problem from yesterday. It was all (well almost) my fault. In the database definition I had forgotten the 'INTEGER' qualifier but in the class definition everything was all right. Now these two didn't fit together and I got these mysterious effects. I say 'almo

[RDBO] cannot find sets that are clearly there

2006-02-20 Thread Michael Lackhoff
Hello again, I just started a project with Rose::DB::Object and I must say I am very impressed. It is really great! But still, I run into one or the other problem. I hope it is o.k. to ask these beginner questions. At the moment something drives me crazy that can be destilled to these few line

[RDBO] multi level relationships?

2006-02-20 Thread Michael Lackhoff
Hi, I wonder if there is a shortcut for multi level relationships. I have three tables in a relationship like 'cities', 'states' and 'countries'. Now I would like to say something like print $city->country->name; I know how to to it in two steps (first get the state then the country from there)