Timeline for entityfieldquery, return several results
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2014 at 10:08 | comment | added | Andy | @Clive I'm with you; there's a touch of ambiguity to UI in a question that features a screenshot of phpMyAdmin and talks about editing entities! | |
Jul 24, 2014 at 10:00 | comment | added | Clive♦ | @Andy Yeah I was trying to make that last statement cover both scenarios (editing through phpmyadmin and editing through the ui). If done through the UI the delta will always be zero-basd | |
Jul 24, 2014 at 9:56 | comment | added | Andy | @user2137454 I think Clive may have slightly misunderstood that question (unless it's me!). If you edit an entity with a multi-value field, click Show weights, and set a weight to -1, that value's delta won't be -1 when saved to the DB. (Clive describes how that's done in his comment.) | |
Jul 22, 2014 at 17:59 | comment | added | Clive♦ |
Sure, if you change database values manually, but why would you be doing that? That's what the API is for, so you don't end up unintentionally introducing inconsistencies in the data...before they're saved, field elements are run through _field_filter_items() to filter out empty items. That function returns them with array_values() , effectively resetting the array keys to zero-based again, so you can count on the delta always starting at zero :)
|
|
Jul 22, 2014 at 17:50 | comment | added | spacecodeur | the delta isn't the weight ? if I set a weight equal to -1 via the ui, the delta in database will equal to -1 no ? it's just curiosity =) | |
Jul 22, 2014 at 16:18 | comment | added | Clive♦ | Yep, you're wrong ;) the delta always starts at zero, assuming the field API had been used correctly | |
Jul 22, 2014 at 16:11 | comment | added | spacecodeur | I don't think its a good solution because the delta maybe modify by differents ways (another module by example..) So, I think the delta don't start all time at 0 =) But maybe im wrong ! | |
Jul 22, 2014 at 15:05 | history | answered | Clive♦ | CC BY-SA 3.0 |