Re: [RDBO] Best way to do multiple calls to database

2007-03-27 Thread Jonathan Vanasco
On Mar 27, 2007, at 3:02 AM, James Masters wrote: A fundamental question has occurred to me. In my legacy code, I do a single call to the database and load (for the sake of arg), an entire table into a hash right at the start. e.g. If I have a table of suppliers, I will I do that

[RDBO] Does build_select() Support the offset argument?

2007-03-27 Thread Robert James Kaes
John, My reading of the Rose::DB::Object::QueryBuilder documentation is that build_select() does NOT support the offset argument like the get_objects() manager method. Is this an oversight, or is there a fundamental reason why build_select() does not support offset (but does support limit?)

[RDBO] Defining Some times Relationships

2007-03-27 Thread Robert James Kaes
Folks, Does RDBO support defining a some time or maybe relationship? Consider the following: CREATE TABLE locations ( id INT, ... ); CREATE TABLE companies ( id INT, location_id INT NOT NULL REFERENCES

Re: [RDBO] Does build_select() Support the offset argument?

2007-03-27 Thread John Siracusa
On 3/27/07, Robert James Kaes [EMAIL PROTECTED] wrote: My reading of the Rose::DB::Object::QueryBuilder documentation is that build_select() does NOT support the offset argument like the get_objects() manager method. Is this an oversight, or is there a fundamental reason why build_select()

Re: [RDBO] Defining Some times Relationships

2007-03-27 Thread John Siracusa
On 3/27/07, Robert James Kaes [EMAIL PROTECTED] wrote: CREATE TABLE locations ( id INT, ...); CREATE TABLE companies ( id INT, location_id INT NOT NULL REFERENCES locations(id), ...); CREATE TABLE exhibitions (

Re: [RDBO] Defining Some times Relationships

2007-03-27 Thread Robert James Kaes
On Tue, 27 Mar 2007, John Siracusa wrote: If there really can only be one such company with the same location id, then you'll have to make location_id a unique key of the companies table and/or Company class: The required attribute makes the method return undef (instead of throwing an