[Maypole] mixing of tables in create

Peter Speltz peterspeltz@yahoo.com
Tue, 1 Feb 2005 09:09:43 -0800 (PST)


--- Josef Chladek <j.chladek@wirtschaftsblatt.at> wrote:


> 
> hello peter,
> 
> yes, i'm using the FromCGI, but as my knowledge of maypole is that of a 
> beginner (not to speak of CDBI) at the moment i have NO clue where to 
> implement that (override the do_edit? how and where could i override 
> the create_from_cgi? ...)

I was thinking override create_from_cgi. you should just be able to put a sub
in your base model class (or just class you want the override) called
create_from_cgi.  

> (http://www.spanner.org/lists/cdbi/2004/11/04/54ea4da4.html)
> 
> > There's been talk a few times of having Class::DBI's normal create() be
> > able to take arguments for related classes as well, and do the right
> > thing. Nothing's really ever come of it, but if it did, then this may
> > help with your problem (rather than trying to handle it in
> > create_from_cgi itself).
> >
> > Tony
> 
> any progress on that, or any plan to implement that in cdbi in the near 
> future?
> 

That'd be cool if there was progress on that. It make create_from_cgi work
easier. What i want  is to have create_from_cgi create all objects on the form.
with one call. That is my form for a customer has address, person, customer
inputs it will create those three objects and cross ref them. Problem was there
wasn't a 1:1 relationship so you never knew if this was a required component or
optional. so i made one, "has_one". Now AsForm can make inputs automatically
for classes of that relationship and hopefully fromCGI can create them soon. 

 

_____________________________________
> maypole mailing list
> maypole@lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
> 


=====
pjs


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail