Hi all.
i have 2 models, Articles and Pieces.
They should've been linked by a HABTM but i need to save some additional
fields in the join table so i made 2x hasMany.
Here's my situation:
Article hasMany ArticlePiece
Piece hasMany ArticlePiece
ArticlePiece belongsTo Article
Ar
I don't see Post or Tag model in this app.
Check this line
https://github.com/ilmattodel93/IMattiDel93-s-Site/blob/master/app/Model/EpisodeRelease.php#L39
or other habtm associations.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new Ca
http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm
*"unique*: If true (default value) cake will first delete existing
relationship records in the foreign keys table before inserting new ones,
when updating a record. So existing associa
> Ok, I've upgraded to 2.0.2, changed the code of
> EpisodeReleaseController.php, and i have fixed the add problem. Now I
> am building the edit function. I have used the console cake bake
> controller to create it, but it seems that each time I press save it
> adds a new association.
> Example;
>
Hi all, I am building a download manager for my site. Now I am
building the edit function for the downloads. I have used the console
cake bake controller to create it, but it seems that each time I press
save it adds a new association.
Example:
"Post" as been added with "TagA" and "TagC". I edit
Ok, I've upgraded to 2.0.2, changed the code of
EpisodeReleaseController.php, and i have fixed the add problem. Now I
am building the edit function. I have used the console cake bake
controller to create it, but it seems that each time I press save it
adds a new association.
Example;
"Post" as been
Ok, putted code on github. This is the repo:
https://github.com/ilmattodel93/IMattiDel93-s-Site
Thanks again for your help! ^^
On 2 Nov, 18:47, Thiago Belem wrote:
> Put your code on Github or Gists and send us the link.
>
> Thiago Belem, enviado do meu Android
> Em 02/11/2011 15:28, "Mattia Man
Put your code on Github or Gists and send us the link.
Thiago Belem, enviado do meu Android
Em 02/11/2011 15:28, "Mattia Manzati" escreveu:
> I Have already checked, and all table are already well related. Same
> column type INT(11) and InnoDB powered. But I still have the
> problem... :S
> What
I Have already checked, and all table are already well related. Same
column type INT(11) and InnoDB powered. But I still have the
problem... :S
What to do now? The code I am using works if I use cakephp1.3
On 2 Nov, 17:51, Jeremy Burns wrote:
> Use InnoDB. As John says, it won't let you creat
Use InnoDB. As John says, it won't let you create RI between fields with
different types (and it's very precise) and you get transactions thrwn in for
good measure.
On 2 Nov 2011, at 16:14, Jon Bennett wrote:
>> I've had some similar trouble with 2.0
>> turned out the fields in the DB were not
> I've had some similar trouble with 2.0
> turned out the fields in the DB were not the same type.
> id on one table was a bigint and the foreign key on the relationship table
> was a regular integer.
> atenciosamente,
With MySQL you can catch these errors at db schema level if you use
foreign ke
x27;]['user_id'] =
>> $this->Auth->User('user_id');
>> $this->EpisodeRelease->set($this->request->data);
>> if($this->EpisodeRelease->saveAll($this->request->data)){
>> $this->Session->setFlash('
Flash('Release aggiunta con
> successo. Sarà visualizzabile non appena un amministratore lo avrà
> approvato.');
> //$this->redirect(array('action'=>'index'));
> pr($this->request->data);
> }else{
Hello all,
i need help.
I had a brand model with $hasAndBelongsToMany = array('Category');
Category is a model with the translation on the field 'name'
Now depending on a category filter in a searchbox I want to identify
which brands are in the search area and which other catgeories are
assigned
https://github.com/milesj/cake-uploader/issues/24
I have opened an issue about this problem. Does anybody have an idea
of why it may not work?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and
Hi!
I was wrong thinking on HABTM. Everything is working ok :-)
Thanks!
On 20 sep, 12:01, WebbedIT wrote:
> You would not want to delete the associated Service as the nature of
> HABTM means that Service could be associated with any number of other
> ServiceCategory.
>
> HTH
You would not want to delete the associated Service as the nature of
HABTM means that Service could be associated with any number of other
ServiceCategory.
HTH, Paul
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
'with' => 'ServiceCategorieService',
),
);
}
#ServiceCategorieService
class ServiceCategorieService extends AppModel {
var $name = 'ServiceCategorieService';
var $useTable = 'servicecategories_services';
}
On 1
ersTclasses->create();
> > $this->Teacher->TeachersTclasses-
>
> > >save($db_data);
>
> > but actually this just worked..
>
> > $this->Teacher->query("INSERT INTO teachers_tclasses
> >
The "dependent" key is not avaible en HABTM
http://book.cakephp.org/es/view/1044/hasAndBelongsToMany-HABTM
Thanks
On 19 sep, 16:41, Thomas Ploch wrote:
> Have you set the 'dependent' key in *both* relationship configurations?
>
> Kind regards
> Thomas
>
&g
Have you set the 'dependent' key in *both* relationship configurations?
Kind regards
Thomas
Am 19.09.2011 16:32, schrieb xamako:
Hi!
I have the following relationship between HABTM tables:
- services
- service_categories
- Servicecategories_services (the latter is what links the
Hi!
I have the following relationship between HABTM tables:
- services
- service_categories
- Servicecategories_services (the latter is what links the two tables
above)
Well, what I get is that when you delete a table record
service_categories, records are automatically deleted from the table
(tclass_id, teacher_id) VALUES
> (".$tclass_id.", ".$teacher['Teacher']
> ['id'].");");
>
> Cheers Chris
>
> On Sep 16, 8:37 am, WebbedIT wrote:
>
>
>
>
>
>
>
> > If using
ut actually this just worked..
$this->Teacher->query("INSERT INTO teachers_tclasses
(tclass_id, teacher_id) VALUES
(".$tclass_id.", ".$teacher['Teacher']
['id'].");");
Cheers Chris
On Sep 16, 8:37 am, WebbedIT wrot
If using Cakes HABTM automagic the table should be named
classes_teachers and have the following fields
id (primary_key, auto_inc)
class_id
teacher_id
After that it's a case of
INSERT INTO classes_teachers (class_id, teacher_id) SELECT class_id,
teacher_id FROM import_table
HTH, Paul
@phpM
hi,
First time user of cake with CI background, I have two tables
teachers and classes that share a many to many relationship e.g.
Teacher-Classes.
I'm having to import the data from CSV files that have been exported
from another system that we have limited access to.I've got the
classes wor
Okay I'll try that and see thanks
On Sep 15, 2:11 am, Jeremy Burns | Class Outfit
wrote:
> Don't do it as HABTM. Create a model and controller for the joining table and
> use $belongsTo and $hasMany.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.c
Don't do it as HABTM. Create a model and controller for the joining table and
use $belongsTo and $hasMany.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 14 Sep 2011, at 23:12, driss wrote:
> I have this data structure :
> Product(Id,name);
> Market(Id,name);
> Pro
is no one can help me ?
any help is welcome
On Sep 14, 10:12 pm, driss wrote:
> I have this data structure :
> Product(Id,name);
> Market(Id,name);
> Product HABTM Market ( I mean that i could have products available in
> many Market or store but the price is not the same f
I have this data structure :
Product(Id,name);
Market(Id,name);
Product HABTM Market ( I mean that i could have products available in
many Market or store but the price is not the same for example this
product X is available in Market1 and in Market2 but in market1 it's
expensive than in Ma
Show us your form view code and then echo your resulting data array
please.
HTH, Paul
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To
Hello,
i'm trying to start using HABTM in Cake 1.3, but can't understand how
can i add an realtion.
Im trynig to create new relation between User and Project records in
DB, but no data apperas in users_projects
after im saving data :(
My code is:
$data = array(
'User'
Hi Mondo,
Paul is right, you should model-ise your join table, effectively creating a
"hasMany through" association, since you're adding additional fields that
are not part of the table's foreign keys. You might want to read this:
http://book.cakephp.org/view/1650/hasMany-through-The-Join-Model
emRecipe
> - Item hasMany ItemRecipe
> - ItemRecipe belongsTo Recipe and Item
>
> This way you can easily work with the extra fields in your join table
> and run finds/paginates on it too.
>
> On Aug 28, 7:51 pm, Mondo wrote:
>
>
>
>
>
>
>
>
28, 7:51 pm, Mondo wrote:
> I have a Recipe, Item, and Units table/model. I have a HABTM
> relationship with Recipe and Item, and I get the default multiple-
> select box when adding/editing Recipe. (am using Bake for everything
> for the most part). The problem is I need to associat
I have a Recipe, Item, and Units table/model. I have a HABTM
relationship with Recipe and Item, and I get the default multiple-
select box when adding/editing Recipe. (am using Bake for everything
for the most part). The problem is I need to associate quantities and
units with each Item.
Sample
Figured it out myself... maybe I should give myself a 24-hour rule from the
time I write my post to the time I actually post it :)
Anyway, to get model deleting to work I set the 'dependent' property to True
in the User model's hasMany relationship for AuthSourcesUser, and my array
to save it l
Ok, I'm getting a little closer. Some digging in more documentation brought
me to this array to use instead:
Array
(
[User] => Array
(
[email] => (my email here)
[first_name] => Ben
[last_name] => McClure
)
[AuthSource] => Array
Well, I realized as soon as I posted that the reason the auth_sources_users
records aren't getting deleted is that their user_id fields are blank... so
I don't know if there's going to be a problem deleting the records or not...
But what am I doing wrong when saving the data using the manually-c
x27; => 'AuthSource',
'foreignKey' => 'auth_source_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'User' => array(
'className' => 'User',
'fore
The way Cake generates HABTM inputs was changed for 2.0. Its supposed
to be less magic, but it doesn't seem like that is the case in this
situation. Having some more information on the rest of the form might
help.
-Mark
On Aug 12, 3:23 pm, handsofaten wrote:
> Hi - I'm working
Hi - I'm working with CakePHP 2.0 beta, and having some trouble with
the expected FormHelper functionality.
I have in my view something like this:
$i = 0;
foreach($terms as $term){
echo $this->Form->input('Term.'.$i.'.id');
$i++
}
>From which I expect something like this to be generated:
.
hi john
thanks for all the help (and the kind encouragement).
i kinda of worked out a solution, posting here for others:
$tag_count = count($artist['Tag']);
$artist = $this->Tags->checkforUpdates($artist);
if (count($artist['Tag'])>$tag_count){
// first save all the tags
foreach($artist['Tag']
, which is mentioned at the bottom
of the page about saving HABTM data in the CakePHP book at:
http://book.cakephp.org/view/1034/Saving-Related-Model-Data-HABTM
Keep up the good work, enjoy,
John
On Aug 9, 8:27 pm, mr_robot wrote:
> hi john. yea it's 1.
>
> i have got it working an
t; 3
),
'Artist' => array (
'Artist' => array (
0 => 7 // this being the artist_id
)
)
),
);
but now it's deleting the already saved associations.
which leads me to this habtmAdd behavior.
http:
rtist, thus
replacing all previous tags added to the artist (this is how HABTM
normally works).
3) You want to do something different from 1 and 2 above.
In 1) you probably have to consider using a HasMany relationship
between Artist and ArtistTag instead of the HABTM between Artist and
Tag.
In 2
so found a solution. sort of. after building some forms and looking at
the output, i see the format as follows:
[Tag] => Array
(
[name] => final2
[rank] =>
)
[Artist] => Array
(
[Artist] => Array
(
. no luck adding the whole $artist array. it starts to do weird
stuff - adding values from the artist table into the artist_tags
table. very confusing.
will try build a form but this is all very strange - i assumed
relations would be straightforward...?
--
Our newest site for the communit
Yes, I saw that, but the book says you have to do it differently in
order to do it automatically.
You have to refer to the Artist like this:
[code]
$artist['Artist']['id'] = 184287;
[/code]
Observe that you should not just call the save method with the
$artist['Tag'] data only, but the full $arti
hi john
thanks for the answer. but i am doing this:
$artist['Tag'][1]['artist_id'] = 184287;
regards
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related
You have to populate the related models Id in your array, as it is
explained in the CakePHP book at:
http://book.cakephp.org/view/1034/Saving-Related-Model-Data-HABTM
So for each Tag record, add the related Artist record with just the
primary key of the Artist record.
Enjoy,
John
On Aug 5, 2
hi there
been pulling my hair out on this one for 2 days.
i have two simple models.
artist and tags.
and i have a artists_tags database table with artist_id and tag_id.
artist model
class Artist extends AppModel {
var $name = 'Artist';
var $hasAndBelongsToMany = array(
Hi,
I wonder if it's possible to get many HABTM relations working in a
single table ? For example I want my Products, Pages and News to be
paired as HABTM with my Images. So I have table named "images_items"
with a model named ImageItem and the table looks like this:
id - IN
it's working the problem about save with HABTM!!! My problem was:
$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));
The value of the parameter 'all' wasn't working.
The next works!!!
$pharmacy = new Pharmacy();
$this-&
Ben it's working the problem about save with HABTM!!! My problem was:
$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));
The value of the parameter 'all' wasn't working.
The next works!!!
$pharmacy = new Pharmacy();
Thank you very much!!! It's working and it's magic like some things in
Cake...
I have problems with save with HABTM, I published other post about it called
"Checkbox múltiples + HABTM". Can you help with it?
Thanks!
era
--
Our newest site for the community: CakePHP V
oups, I forgive a "Categorie" replacement.
You must read "PharmaciesTurn" instead of "CategoriesTurn"
On 27 juil, 09:50, BenJsno wrote:
> Hello,
>
> -- in your controller function (add or edit):
> ...
> $pharmacies = $this->Turn->Pharmacy->find('list');
> // FOR SELECTED CHECKBOX : (only in
Hello,
-- in your controller function (add or edit):
...
$pharmacies = $this->Turn->Pharmacy->find('list');
// FOR SELECTED CHECKBOX : (only in edit)
$options['joins'] = array(
array('table' => 'pharmacies_turns',
'alias' => 'PharmaciesTurn',
'type' => '
Hello. I can't save multiple checkbox in HABTM.
My code is:
MODEL
array( 'className' =>
'Pharmacy' ) );
var $validate = array(
'name' => array(
'rule' => 'notEmpty'
),
);
}
?>
array( 'className&
Hello! I want to show in the view a list of checkbox of Pharmacies to
assign to a Turn.
Example:
Turn: INPUT TEXT
Pharmacies:
CHKBOX1
CHKBOX2
CHKBOX3
Can help me with this?
Thanks!
eraonline
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the
emove completely the model for your join table - the UsersLink
model.
3) define a normal habtm relationship between the User model and the
Link model.
4) read the manual before you start another project - all of this is
clearly explained in many translations.
On Jul 21, 10:45 am, Jeremy Burns | Class O
'className' => 'User',
> 'foreignKey' => 'user_id',
> 'conditions' => '',
> 'fields' => '',
> 'order' =&g
('table' => 'links',
'alias' => 'Link',
'type' => 'inner',
'conditions' => array(
'UsersLink.link_id = Link.id'
)
=> array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
If you have defined a HABTM relationship your joining table should be
links_users (i.e. the tables are in alphabetical order).
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 21 Jul 2011, at 16:26, localhost wrote:
> Hi everyone,
>
> I have being trying to solve this for t
Hi everyone,
I have being trying to solve this for the last 4 hours with no luck.
basically I have the following tables
users
links
users_links
Basically I'm trying to get the below query to run using find('all')
and paginate (I'm running this inside UserController)
SELECT Links.id,Links.Title
Ok, looking at the Mongo DB source code, it doesn't do any association
queries. So i'm written a behavior to solve it.
On Jul 18, 4:55 pm, LordG wrote:
> Hello Bakers,
>
> I'm busy testing Models with MongoDB. I have two Models: Recipe and
> Tag.
>
> class Recipe extends AppModel {
> var $nam
Hello Bakers,
I'm busy testing Models with MongoDB. I have two Models: Recipe and
Tag.
class Recipe extends AppModel {
var $name = 'Recipe';
var $mongoSchema = array(
'name' => array('type' => 'string'),
'description' => array('type' => 'string'),
Is CAKEPHP developer team planning to correct/adjust the _deleteLinks
function in the cake\libs\model\model.php ?
It ignores the conditions definition declared in the model.
-- Original code:
function _deleteLinks($id) {
foreach ($this->hasAndBelongsToMany as $assoc => $data) {
You can either add a JOIN [1] query for each HABTM association you want to
filter on the pagination find, or BIND [2] the join table models
(ProductsCategory and ProductsColor) to the Product model as HasOne
associations before doing the pagination. Both would require to specify that
the join must
Hi.
I would like to paging products with multi Habtm.
My tables:
products
categories
colors
And HABTM connections
Product HABTM Categories products_categories
Product belongsTo Color
How do I make a query like the following? (width : Habtm Pagination)
Category.id = 3 and Color.id=4 all
rst does a count query ...
>
>
> Andras Kende
> http://www.kende.com
>
>
> On Jun 25, 2011, at 3:14 AM, Prabha Vathi wrote:
>
> Hi,
>
> I m not able to get good example for habtm.
> I tried something.
> $this->Post->unbindMode
bha Vathi wrote:
> Hi,
>
> I m not able to get good example for habtm.
> I tried something.
> $this->Post->unbindModel(array('hasAndBelongsToMany'=>array('Tag')));
> $this->Post->bindModel(
> array(
>
Hi,
I m not able to get good example for habtm.
I tried something.
$this->Post->unbindModel(array('hasAndBelongsToMany'=>array('Tag')));
$this->Post->bindModel(
array(
'hasOne'=>array(
'
HI
you can solve this problem usign "custom query pagination".
you can search in google you will get many examples.
On Fri, Jun 24, 2011 at 10:02 PM, Prabha Vathi wrote:
> Hi,
>
> In tagscontroller,
> $this->paginate = array('conditions' => array('Post.status' =>
> 'active','Tag.tag_machine_
Any Help Please?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscr...@google
Hi,
In tagscontroller,
$this->paginate = array('conditions' => array('Post.status' =>
'active','Tag.tag_machine_value' => $name),'limit' => 3);
$posts = $this->paginate('Post');
$this->set(compact('posts'));
Tag and Post model have hasAndBelongsToMany relation.
I am getting Unknown column 'Tag.
You should check this:
http://bakery.cakephp.org/articles/nachopitt/2010/07/01/habtm-validatable-behavior
On 15 jun, 08:24, Shaz wrote:
> I haven't actually made models for the Join table - I don't think you
> need to for a HABTM relationship
>
> On Jun 15, 1:41
I haven't actually made models for the Join table - I don't think you
need to for a HABTM relationship
On Jun 15, 1:41 pm, Rob Maurer wrote:
> Interesting. What would happen if you put the validation in the model
> for the join table?
>
> On Jun 14, 3:17 pm, Shaz wrot
t;
>
>
>
> > Write the Validation Rule in Language Model instead of User Model
>
> > On Jun 14, 9:56 pm, Shaz wrote:
>
> > > I have User HABTM Language, and i want to ensure during a User add /
> > > edit they choose a minimum of one language
that validation; where I only want the
users to...
Thanks!
On Jun 14, 8:14 pm, hunny wrote:
> Write the Validation Rule in Language Model instead of User Model
>
> On Jun 14, 9:56 pm, Shaz wrote:
>
>
>
>
>
>
>
> > I have User HABTM Language, and i want to ensure
Write the Validation Rule in Language Model instead of User Model
On Jun 14, 9:56 pm, Shaz wrote:
> I have User HABTM Language, and i want to ensure during a User add /
> edit they choose a minimum of one language, upto a maximum of 3. In
> the user model, for $validate I've tried:
I have User HABTM Language, and i want to ensure during a User add /
edit they choose a minimum of one language, upto a maximum of 3. In
the user model, for $validate I've tried:
'Language' => array(
'multiple' => array(
Hi,
I'm using for my user table, username like PK and I have a HABTM
relationship between user and messages, but when I create a message, the
table messages_recipients is empty :(
any help??
best regards,
Jorge
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/
I have the following relationships (habtm both ways):
User HABTM Groups
User HABTM Events
User HABTM Locations
So for example - I want to get users that belong to groupA, groupB and
locationX and paginate the results - whats the best way of
implementing it?
I'm trying to avoid using bind
Hi everyone,
I have a problem when using CakePHP HABTM.
I have the following models.
class Repositorio extends AppModel{
var $name="Repositorio";
var $hasAndBelongsToMany = array(
'Sesion' =>
array(
'joinTab
Hi there,
Has anyone noticed any issues with the Miles J Uploader pluign (http://
milesj.me/code/cakephp/uploader) when used in forms that have HABTM
elements?
If I comment out the the habtm field the uploader works like a charm,
as soon is its present though it fails to upload the files return
Not sure if you read the question fully or just didnt understand it but I
have already read ALL of that and frankly it is irrelevant. :)
My issue is not covered anywhere in the cake docs as i have seen. My
problem is similar to this guy and I am about to give this a whirl.
http://cakephp.10456
http://book.cakephp.org/view/1231/Pagination read this :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2011/5/6 Dee Johnson
> Hi guys, I would like to make a
>
> $this->MODEL->find call but would only like to bring back the items related
> to that query and paginate the results.
>
> I tried
Hi guys, I would like to make a
$this->MODEL->find call but would only like to bring back the items related
to that query and paginate the results.
I tried $this->paginate('Model', ('model.field' => 'value');
and then looped through the results but it looses the pagination on the
related data
Hi guys, Im having a small issue here.
I have a model1 that HABTM model2
before I send the results to the view via a set, I run a foreach loop grab
the first bit of results and then another to get to the associated data.
the data array at that point (associated data only is being sent to
ally every record except few latest uncategorized
posts.
in the long run those 3 lines of code will crush your server.
perhaps you should look into habtm countercache.
although it is not implemented for habtm as core feature. i've come
across some articles with workarounds
do that and it will c
Ignore my previous message...
I have solved it with this http://bin.cakephp.org/view/471586323
Thank you again, cricket :D
David.
On 29 abr, 10:17, davidhc wrote:
> Only one more doubt...
>
> Could I use the native cakephp paginator with this model function?
--
Our newest site for the communi
Only one more doubt...
Could I use the native cakephp paginator with this model function?
Thanx!
On 29 abr, 10:13, davidhc wrote:
> Thank you very much, cricket!
>
> I have change your code:
> $ids = Set::extract($this->PostCategory->find('all'),
> '{n}.PostCategory.post_id');
> with:
> $ids =
ine :)
Thank you!
David.
On 28 abr, 21:22, cricket wrote:
> On Thu, Apr 28, 2011 at 12:31 PM, david hc wrote:
> > Hello,
> > I have a table posts related with table categories with de habtm table
> > posts_categories.
>
> > posts.id
> > categories.id
>
On Thu, Apr 28, 2011 at 12:31 PM, david hc wrote:
> Hello,
> I have a table posts related with table categories with de habtm table
> posts_categories.
>
> posts.id
> categories.id
> posts_categories.post_id
> posts_categories.category_id
>
> I'm trying to g
Hello,
I have a table posts related with table categories with de habtm table
posts_categories.
posts.id
categories.id
posts_categories.post_id
posts_categories.category_id
I'm trying to get all the records WITHOUT category (because I have
posts taken from RSS and not categorized yet).
My
I wanted to save a HABTM model but without using a regular form.
Consider
Entity1 HABTM Entity2, so we have a DB table for entity1, one for
entity2 and one like entity1_entity2.
I construct my own array like:
[Entity1] => (field1, field2)
[Entity2] => (
[0] => (field1, field2)
[1] =
Hi guys - any ideas? Am I doing this wrong, or is this just
inconsistent behaviour and I should raise a ticket?
cheers
On Apr 22, 7:26 pm, Tonu Tusk wrote:
> Hi there ...
>
> so let's say I have
>
> Cake habtm Ingredient
>
> and
>
> Ingredient habmt Cake
&g
Hi there ...
so let's say I have
Cake habtm Ingredient
and
Ingredient habmt Cake
If I was to prep $data such as
[Cake][id] => 1
[Ingredient] => array(1, 2, 3)
and did a
Cake->save($data)
this would delete any existing associating records in the join table
between these
201 - 300 of 2632 matches
Mail list logo