[RDBO] Rose::DB::Object::Loader

2006-04-29 Thread Guillermo Roditi
I can't get it to work :-/It seems to run fine but then I have no output or anything? is it supposed to ouput to stdout? or a file?  This is the first time I use Rose::DB or any ORM for that matter so pardon me if i am being clueless, because.. well, I am. here's my code in case it helps anyone tel

[RDBO] cached objects

2006-05-01 Thread Guillermo Roditi
Is there any reason why I wouldn't want to use Rose::DB::Object::Cached for everything instead of just using Rose::DB:: Object  as a base for my database table classes?

[RDBO] Error code meaning

2006-05-01 Thread Guillermo Roditi
Hi, I am having a little trouble with Rose::DB::Object.I keep getting the error below and I am not entirely sure what it means... Dos it mean that it couldnt guess the foreign class name ?Use of uninitialized value in concatenation (.) or string at     /usr/local/lib/perl5/site_perl/5.8.7/Rose/

Re: [RDBO] Error code meaning

2006-05-01 Thread Guillermo Roditi
TED]> wrote: On 5/1/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote:> Hi, I am having a little trouble with Rose::DB::Object.>> I keep getting the error below and I am not entirely sure what it means... > Dos it mean that it couldnt guess the foreign class name ?Are you using the

Re: [RDBO] Error code meaning

2006-05-01 Thread Guillermo Roditi
y where and why the module is dying. any suggestions or should i unrelate everything and then comment the relations one by one until something breaks? On 5/1/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote: Hmmm. I actually found it. a misspelling while defining a relationship. I grepd throu

Re: [RDBO] Error code meaning

2006-05-01 Thread Guillermo Roditi
its doing already i am so so lost right now. On 5/1/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote: OK I spoke to soon. The errors are back on the rest of my codebase. If i take the __PACKAGE__->meta->relationships(...) lines it seems to be fine. I think it may be an issue with th

Re: [RDBO] Error code meaning

2006-05-01 Thread Guillermo Roditi
1 },    pref_id => { type => 'integer', not_null => 1 },    p_value => { type => 'blob', length => 65535 },     vhash   => { type => 'character', length => 32, not_null => 1 },);__PACKAGE__->meta->primary_key_columns([ 'user_id', 

[RDBO] How to make graphviz charts from database schemas automagically

2006-05-02 Thread Guillermo Roditi
I added it to the wiki. and I also reverted some spam.http://rose.sourceforge.net/wiki/index.php/Generating_Schema_Graphs

Re: [RDBO] How to make graphviz charts from database schemas automagically

2006-05-02 Thread Guillermo Roditi
Fixed the emacs cut n paste error. wiki source is below for the pageI made a simple set of functions to generate dot files for rendering into graphs of database schemas and their relationships.You can get a hold of me at groditi[at]gmail[dot]com ===dotmaker.pl===use Rose::DB::Object;   

Re: [RDBO] How to make graphviz charts from database schemas automagically

2006-05-02 Thread Guillermo Roditi
yeah. captcha or requiring registration, but the latter sucksim on the wiki dev list and theres often captcha talk yet i see no code attached. im sure its out there though. I'd help look but I am kind of at work : / On 5/2/06, John Siracusa <[EMAIL PROTECTED]> wrote: On 5/2/06

[RDBO] Fail on load on record retrieved by Manager

2006-05-03 Thread Guillermo Roditi
any idea why this would happen...i load all records through the manager into an array ref and i get the results below... then i try to load one of these records based on their ID and it tells me i can't... even though the manager found it alright... any clue? output below from data dumper$VAR1 = [ 

[RDBO] Re: Fail on load on record retrieved by Manager

2006-05-03 Thread Guillermo Roditi
fixed. i dont know what was wrong. it just started working all of a sudden. weirdest thinganother question though. any reason why there is no 'time' type for columns ? On 5/3/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote: any idea why this would happen...i load all records thr

[RDBO] triggers and overloading

2006-05-03 Thread Guillermo Roditi
Hey,I have a table which includes a blob and a field for a hash of that blob. I'd like to make atrigger that automatically updates the hash every time the blob is changed, so i figured i would do it with a trigger. I figured the best way to do it would be by overloading new, but that doesnt work...

Re: [RDBO] triggers and overloading

2006-05-03 Thread Guillermo Roditi
ay. Should I subclass Rose::DB::Object? Should I create a new relationship type?  where in the space do you think I would be best off hacking this in?or am I missing something much more obvious?Guillermo On 5/3/06, John Siracusa <[EMAIL PROTECTED]> wrote: On 5/3/06, Guillermo Roditi <[EMAIL PRO

Re: [RDBO] triggers and overloading

2006-05-03 Thread Guillermo Roditi
SQL definitions are at the bottom if i am not clear enoughyeah, i am basically trying to do a view, but myISAM doesnt support itbasically this is what i haveI have users, user properties, and user property types and user property values. A user is straight forward;A user prop is a named pro

Re: [RDBO] triggers and overloading

2006-05-03 Thread Guillermo Roditi
A prop_values view is the cleanest solution.  Any chance you can upgrade toPostgres? :)  Failing that, you could probably make a new relationship type for this "pull values from many different tables depending on a column valuein another table" relationship, but I'm not sure how general-purpose it'

Re: [RDBO] Inheritance change_column()

2006-05-10 Thread Guillermo Roditi
i like replace too. i think dealing with columns is far enough away that it wont be ambiguous with the replace that deals with rowsOn 5/10/06, Uwe Voelker <[EMAIL PROTECTED]> wrote:> "Change" sounds like it alters the existing column in-place.  How about > swap_column() or exchange_column() instea

[RDBO] Self-referential relationships

2006-05-25 Thread Guillermo Roditi
I am building a TODO manager, and I am having trouble grasping how i should handle dependency relations within todo objects. here's a simplified layoutTo_DosFields: id (PK), title, due_date PK: idTo_Do_DependenciesFields: dependent_id (FK To_Dos.id), dependee_id (FK To_Dos.id)PK: dependent_id, depe

Re: [RDBO] column default values

2006-05-25 Thread Guillermo Roditi
es On 5/25/06, John Siracusa <[EMAIL PROTECTED]> wrote: On 5/25/06, Guillermo Roditi <[EMAIL PROTECTED]> wrote:> I'd like to alter Rose::DB to be able to tabe a subref as a default value> for a column in the table object classes so that upon insertion of a new row > the d

[RDBO] column default values

2006-05-25 Thread Guillermo Roditi
I'd like to alter Rose::DB to be able to tabe a subref as a default value for a column in the table object classes so that upon insertion of a new row the default value can be dinamically calculated. I looked in Metadata and Metadata::Column but I couldnt really locate myself very well. Is this som

Re: [RDBO] column default values

2006-05-25 Thread Guillermo Roditi
ROTECTED]> wrote: On Thu, 2006-05-25 at 13:26 -0400, Guillermo Roditi wrote:> Basically the promblem is that I want default for a column to be> NOW(). unfortunately that is getting insterted as -00-00  so my> guess is that it's getting screwed up in the placeholder stage, and

Re: [RDBO] Sugared class setup proposal

2006-05-30 Thread Guillermo Roditi
I like it as wellOn 5/30/06, Ted Zlatanov <[EMAIL PROTECTED]> wrote: On 30 May 2006, [EMAIL PROTECTED] wrote:> 1. setup() will only run once.  (An override will be available to> force it to run more than once.)So this makes "unless(__PACKAGE__->meta->is_initialized)" unnecessary? Great!> 3. Any cla

[RDBO] questions about the manager

2006-06-01 Thread Guillermo Roditi
OK, I am trying to create a RDBO session store object for Catalyst::Plugin:Session::Store.It all seems fairly straight forward until this comes up, I need to call manager methods, however I can not make the assumption that I know the names of these methods because they change. This seems like it co

Re: [RDBO] questions about the manager

2006-06-01 Thread Guillermo Roditi
make them 2 separate methods and allow you to override the traditional insert_or_update behavior in the object declaration as part of the meta object maybe__PACKAGE__->meta->use_on_duplicate_key_update(1); then the helper will know whether to over ride to the new method or to default to the existin

Re: [RDBO] use sql functions in inserts and selects

2006-06-02 Thread Guillermo Roditi
A trigger may also be a good approach for you if the function can be had in perl.On 6/2/06, John Siracusa <[EMAIL PROTECTED] > wrote:On 6/2/06, Ask Bjørn Hansen <[EMAIL PROTECTED] > wrote:> When I insert or update those columns I need RDBO to wrap the data I> provide in GeomFromText() ("insert into

Re: [RDBO] questions about the manager

2006-06-02 Thread Guillermo Roditi
I get the meta part (I actually typed that exact method name in anearlier email before I revised it) but then why is there a need for two helper methods?  Wouldn't setting that attribute simply change thebehavior of the lone insert_or_update() helper method?yeah thats exactly the idea. it means old

[RDBO] custom compund field creation

2006-06-12 Thread Guillermo Roditi
I am making some custom fields, like for example, in a todo list, a todo item. i can't wrap my head around the deccmposing and coalescing though. I know what i need to do and i see the examples, but is there any reason to not just use data::dumper and eval() ??