Questions tagged with behavior

2 answers

2 votes

Asked by DmitriySpb, on 10/11/09 in

Gallery behavior

Hello, I was building my custom gallery behavior to enable "attaching" images for any other model.

My behavior uses model named 'Photo' as storage for saving uploaded photos. Here's schema:

CREATE TABLE IF NOT EXISTS `photos` (
  `id` int(10)...

3 answers

0 votes

Asked by Lemon, on 1/11/09 in

1 answer

0 votes

Asked by R4F43L, on 26/11/09 in

Logable Behavior

I'm trying to use Logable Behavior from (alkemann), but I'd like to identify the user on log using Auth information from session, and use log for other actions (not only crud). It's possible?

Thanks.

0 answers

0 votes

Asked by georlitz, on 11/12/09 in

What is the use of the AcoAction model?

I'm working on coding up a nice interface for adding/removing ACOs, and granting/revoking permissions on them for the AROs in my database. I have a functioning system, but it definitely could use some polishing.

With that context in mind, what is...

1 answer

0 votes

Asked by agoddard, on 19/12/09 in

SMTP Issues?

I purchase a pre-made site and it sends user registrations, password reminders and news items to it's users but it will not send the information via SMTP. Here is the array - why isn't working or is a server specific issue? I am on a Linux...

1 answer

0 votes

Asked by anurag, on 29/12/09 in

How to save an i18n record in 3 languages in ONE save?

Its possible to save an i18n record in more then 2 languages in ONE save?

1 answer

0 votes

Asked by anurag, on 29/12/09 in

In Translate Core Behaviors Saving in another languages is possible ?

In the Cookbook show translate core behaviors saving data in another language.

by using below mention controller code

<?php

class PostsController extends AppController {

var $name = 'Posts';

function add() {

if ($this-data) {

$this-Post-locale =...

1 answer

0 votes

Asked by mdm414, on 8/1/10 in

Session Handling

Hi,

Why are session variables changeable via $_SESSION even when Session.save is set to cake or database? Is this behavior safe? If not, how do I disable this behavior in cakePHP 1.2.5?

Thanks

3 answers

0 votes

Asked by BManya, on 14/1/10 in

No entiendo la utilidad de los Behaviors

Ayer empeze a estudiar cakephp y a intentar desarrollar mi primer aplicacion, creo que voy bien, pero no logro entender para que sirven los behaviors? para que se incluyen en el modelo? que funcionalidad le da el behavior al modelo? Leo una y...

0 answers

0 votes

Asked by Alfred, on 18/1/10 in

counterCache and Tree behavior

I have Post and Category models. Post belongs to Category, and Category has many Posts. Category behaves like a tree. Now if I put counter cache on belongsTo relationship of Post model I will get number of posts in counter field of categories...

1 answer

0 votes

Asked by johype, on 19/1/10 in

How can I update and maintina a database table via csv?

I have this table of products, that needs to get updated periodically via csv, is there a way to setup updateAll, and saveAll functions to accomplish this? I have already setup the CSVs as a datasource.

1 answer

0 votes

Asked by rossjha, on 20/2/10 in

Tree behavior, move methods not working

Hi

I'm trying to use the moveup movedown functions from the cake book. I

have the following and it doesn't return any errors, i've checked the

values in the function, but it's not working. I get the success

message but nothing has changed in the...

1 answer

0 votes

Asked by ade007, on 11/3/10 in

Restricting UPDATE, model should only INSERT

How can I restrict a model from updating data? I need the most reliable solution. Data shouldn`t be touched in any circumstances.

Something like, is if id is present in a save call, ignore the id, make and insert and maybe log the action that...

1 answer

0 votes

Asked by Ranilson, on 11/3/10 in

Add a record and update another table

Hi everyone,

I would like to know how to add a record to one specific table and, after doing that, update another table's field, but I need to do that using the same action.

Thanks

2 answers

0 votes

Asked by Contemplate, on 15/3/10 in

hasAndBelongsToMany retrieve

Hai!

I have 2 models linked to each other with hasAndBelongsToMany:

Users

Restaurants

My problem is to query only those rows that are necessary like:

All Restaurants“ that a User“ has.

I tried it with:

$this-User-find('all',

array(

'conditions' =...

1 answer

0 votes

Asked by martu, on 22/3/10 in

extra fields when using tree behavior

i was working with the example at:

http://book.cakephp.org/view/228/Basic-Usage

next, when i use generatetreelist(), i get a plain list with the records id and names.

i need extra data from this table, like url, but i can't find a way to get extra...

1 answer

0 votes

Asked by kramers, on 26/3/10 in

Help with containable

I am trying to figure out how to use containable properly.

These are the model relationship:

Client has many Account

Account has many Bills

Bills have many BillResources

ResourceType hasMany BillResource

BillResources belong to bill

Bills belong to...

3 answers

1 vote

Asked by zoghal, on 28/3/10 in

how to get model name into behavior

hi

I want to find the name of the model via behavior, which has belongs to relation with model Cat

for example in this case, I want to find the name of the model Learning which has belongs to relation with model Cat



class Learning extends...

1 answer

0 votes

Asked by patrickmueller, on 28/3/10 in

Translation behavior and Model relations

I've a problem with my cake application.

i've 2 tables (sites and articles). The relations in the model:

sites belong to sites (self join)

sites has many sites

sites has many article

articles belongs to sites

I added the translation behavior to my...

0 answers

0 votes

Asked by patrickmueller, on 28/3/10 in

find-request empty

Since I have the translate behavior in my model the find requests to a related model doesn't work anymore. The request is empty. No error, just empty.

When I remove the translation behavior in the realted model it works...

Does someone have an idea...

<< previous 1   2