Dynamic checkboxes aren't being checked

This is driving me mad! I have a many-to-many table containing fields which are created by a checkbox group. The updating is working fine but when I open the form, none of them are checked. I’ve gone through everything and just can’t see what’s wrong. Here’s my code:

                    <div class="form-group" is="dmx-checkbox-group" dmx-bind:value="connAccommodation.data.queryAmenities.values(`AmenityID`)">
                        <p>Amenities</p>
                        <div class="form-check form-check-inline" dmx-repeat:repeatamenities="connAllAmenities.data.queryAllAmenities">
                            <input class="form-check-input" type="checkbox" dmx-bind:id="inp_amenity_{{$index}}" dmx-bind:value="AmenityID" name="amenity[]">
                            <label class="form-check-label" dmx-bind:for="inp_amenity_{{$index}}" dmx-text="amenityName"></label>
                        </div>
                    </div>

Can anyone help me?

Community Page
Last updated: