Questions tagged with hasone

1 answer

0 votes

Asked by mattes, on 17/12/09 in

form helper required class for not empty fields on hasOne Model

I got a form where I submit data for multiple models.

The validation for the Database is no problem. With the


$user = $this->Employee->saveAll($this->data, array('validate' => 'first'));

all valdation Rules of other Models are checked.

Now my...

2 answers

0 votes

Asked by krusty999, on 21/1/10 in

How Save Multiple HasOne relations?

I have the models:

Content

var $hasOne = array('ContentsContact', 'ContentsLocation', 'ContentsSchedule');

ContentsContact

var $hasOne = array('Content');

ContentsLocation

var $hasOne = array('Content');

ContentsSchedule

var $hasOne =...

0 answers

0 votes

Asked by dimis283, on 3/3/10 in

hasone problem

I ahve a table machine that has one service (the id id of service foreign key at machine).

So when I put at machine model the code nothing fetched but when I delete all machines are shown, what is wrong?

var $hasOne...

1 answer

0 votes

Asked by omidzaman, 2 weeks, 5 days ago in

How to register a user and at the same time create a record in Account ( hasOne relation without form)

Hi

I am new to cake php and as a practice I am working on one simple

project.

I have tree model user, account and contact as below. (There is only

one form for user registration and no form for add action to account).

user model :

var $name =...

<< previous next >>