Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Welcome to the Monastery
 
PerlMonks  

Re^2: FormFu, DBIC, and multiple tables

by uG (Scribe)
on Mar 31, 2010 at 03:43 UTC ( #831976=note: print w/ replies, xml ) Need Help??


in reply to Re: FormFu, DBIC, and multiple tables
in thread FormFu, DBIC, and multiple tables

<model_config> resultset Sets delete_if_empty 1 </model_config>
delete_if_empty deletes all rows that are related instead of just the row set in resultset. I want it to just delete the row it belongs to.


Comment on Re^2: FormFu, DBIC, and multiple tables
Download Code
Re^3: FormFu, DBIC, and multiple tables
by Anonymous Monk on Mar 31, 2010 at 03:48 UTC
    I don't see how that is a perl program, code I can run and test and possibly understand.
      Maybe you should abandon this node then, because there isn't going to be code you can run. The config file (for a PERL MODULE) that I posted is capable of deleting a DBIC model without any perl code. I don't think you're familiar with HTML::FormFu and I don't think you're going to be able to answer my question without previous knowledge of this semi complex form framework. I could post a huge catalyst app for you with a sql dump of my database, but lets be real; no one is going to deal with all that shit, especially when relevant code is merely
      <model_config> resultset Sets delete_if_empty 1 </model_config>
      remove delete_if_empty 1, and nothing gets deleted if the input is blank. Leave it there, and the row it belongs to (along with every row related to it) gets deleted. No perl code required besides telling my catalyst controller to use a formfu config for the action's form. This is clearly intended behavior, and shouldn't require code to explain. What does require an explanation is how do I delete only the row it belongs to, and if this requires setting a parameter in the config to point the element to a different ResultSet how do I do this?
        I could post a huge catalyst app for you with a sql dump of my database, but lets be real; no one is going to deal with all that shit, especially when relevant code is merely

        So how about you construct a minimal test sample? That others can run and give you an answer?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://831976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2014-04-23 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls