Questions tagged with belongsto

2 answers

1 vote

Asked by otisjs01, on 20/12/09 in

How do I pass a variable between views?

Hello,

I am relatively new to CakePHP and I am running into a problem that I think is pretty simple, but I just can't seem to figure it out. I feel like the answer has something to do with parameters, but I'm just stumped on how to implement it!

I...

3 answers

0 votes

Asked by masterpfc, on 8/3/10 in

hasMany and belongsTo

Hello everyone,

I am new to cakephp, I faced the problem while using hasMany.

I have three models and there are relationships between them.

User, Client, ClientConsulting

User can have many Client, but I didn't declare anything on User.

Client...

1 answer

0 votes

Asked by christiand, on 10/3/10 in

Cake is erasing HABTM relationships when updating model

In the spirit of cake..

Recipe HABTM Tags

Tag HABTM Recipes

Tag BelongsTo Image

I want an Image attached to every Tag.

In the images_controller, I save the image, then key the offer to try and make the association

$tag['Tag']['id'] =...

0 answers

0 votes

Asked by spww, on 16/5/10 in

belongsTo and hasMany relation split in two queries?

Hello there,

I've got four models: User, Gallery, Picture, Comment

Picture got the following relations set in its model.php:

var $belongsTo = array('Gallery', 'User');

var $hasMany = array('Comment' = array('dependent' = true));

I've got a pagination...

0 answers

0 votes

Asked by spiliot, on 3/6/10 in

How to best implement ACL with multiple groups asigned to users

ACL is based on the tree behavior which implements a ParentNode[/ChildNode]/EndNode tree for the AROs. Each end node can only belong to a single parent.

My plan is to have users.hasAndBelongsToMany.usergroups so the user will be inheriting the...

0 answers

0 votes

Asked by saeed, 4 days, 11 hours ago in

Pagination.

Hi all,

I am stuck on pagination. I am trying to paginate feePayment records based on certain criteria.

feePayments belongs to Students which in turn belongs YearGroups.

I want to paginate 'unpaid' feePayments for each year group. The problem I am...

<< previous next >>