Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:50:56+00:00 2026-05-27T05:50:56+00:00

I’ve been following the information from here: cfwheels.org/docs/1-1/chapter/nested-properties I’ve ended up downloading a sample

  • 0

I’ve been following the information from here:
cfwheels.org/docs/1-1/chapter/nested-properties

I’ve ended up downloading a sample application which breaks down at the same place

code executes fine, in the sense that I get no errors, but the many-many table does not get the new entries, and when I add the entries manually in the database, they are not reflected with the checkboxes and sometimes they are removed when the model is updated.


EDIT

I found out the issue… just not how to solve it. There’s a small detail there that is very easy to miss. The application seems to rely on composite keys and the order of the keys matters. But I’m not using composite keys.

(following https://github.com/mhenke/cfwheels-training/blob/develop/03-tags.md as an example…)

How do I get a table with cols: id,tagsid, and commentsid to work?

the problems I see is that cfwheels keeps trying to use the id tag when creating the taggings model

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:50:57+00:00Added an answer on May 27, 2026 at 5:50 am

    As much as I love about CFWheels, I have to admit that I am not a fan of the form helper functions or the “shortcut” feature. In this example case, I’d just “revert” to the more straightforward/simple CFML to construct the checkboxes (if not the whole form) and looping logic to save the values in the join table. For example:

    <fieldset>
    <legend>PropertyLanguages</legend>
    
    <cfloop query="Languages">
    <label>
      #Languages.language#
      <input type="checkbox" name="Property[PropertyLanguages]" value="#Languages.id#">
    </label>
    </cfloop>
    
    
    </fieldset>
    

    Then change the update controller logic like so:

    <!--- CONTROLLER - update.cfm - updateProperty --->
    <cffunction name="updateProperty">
        <cfscript>   
        Property = model("Property").findByKey(key=params.Property.id);
        Property.update(params.Property);
    
        if (IsDefined("params.Property.PropertyLanguages"))
        {
          model("PropertyLanguages").deleteAll(where="propertyid=#params.Property.id# AND languageid NOT IN (#params.Property.PropertyLanguages#)");
    
          for (var i = 1; i<=ListLen(params.Property.PropertyLanguages); i++)
          {
            languageid = ListGetAt(params.Property.PropertyLanguages, i);
            if (! IsObject(model("PropertyLanguages").findOne(where="propertyid=#params.Property.id# AND languageid=#languageid#")))
            {
              pl = model("PropertyLanguages").new();
              pl.langugageid = languageid;
              pl.propertyid = params.Property.id;
              pl.save();
            }
          }
        }
        else
        {
          model("PropertyLanguages").deleteAll(where="propertyid=#params.Property.id#");
        }
        </cfscript>    
    </cffunction>
    

    I haven’t tested this, but it should work, more or less. It’s not as simple as it could (should?) be using the wheels helpers, but it doesn’t seem too bad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.