I was afraid of that... I've read some other reply's by you in another
thread, and based on that, I was already expecting that this could not
be done. Would be great functionality though.
On Feb 6, 10:37 am, AD7six [EMAIL PROTECTED] wrote:
On Feb 6, 10:23 am, Bo-oz [EMAIL PROTECTED] wrote:
On Feb 6, 10:23 am, Bo-oz [EMAIL PROTECTED] wrote:
It's 1.19 btw... but think that won't mather much.
I think you need (a v recent) 1.2 for that to work unless you do it
yourself
hth,
AD
--~--~-~--~~~---~--~~
You received this message because you are
Hi guys,
There seems to be something incorrectly happening with model
association calls and the naming of the resulting record arrays. If I
have a Model called LayoutModel with $name = 'Layout', then naturally
all the findAll calls etc will give me a resultset with the array keys
as 'Layout
This does also tend to be related to my post on naming conventions in
http://groups.google.com/group/cake-php/browse_thread/thread/35318b04d8a93144/fcffe0e17499f82c?lnk=stq=#fcffe0e17499f82c
if the class name and the $name value are to be the same, why is this
not the case with Controllers? Is
Did you try turning on debug mode and see how the SQL statement looks
like? Try running the sql statement manually and you should be able to
track where the problem is.
Zonium
On Dec 7, 5:30 pm, sanderken [EMAIL PROTECTED] wrote:
People looking for the answer to defining limit row in oracle
People looking for the answer to defining limit row in oracle :
in the model , use the
'conditions' = ' WHERE ROWNUM = 3 '
option.
Limit is the implementation in mySQL.
Hope this helps someone...
On 8 dec, 01:53, sanderken [EMAIL PROTECTED] wrote:
Maybe I should mention I'm using
Maybe I should mention I'm using oracle for DBMS.
On 7 dec, 21:54, sanderken [EMAIL PROTECTED] wrote:
Hey,
I defined a user (named Gebruiker in my native language ) model
where when I call a $this-find() , needs to retrieve only a limited
amount of related information.
When I add the
Hey,
I defined a user (named Gebruiker in my native language ) model
where when I call a $this-find() , needs to retrieve only a limited
amount of related information.
When I add the 'limit' = '10' to the association info, it doesn't
work. For example: I call
$gebruiker = $this-find(
I'm not sure about the wierd table and id names, but it's perfectly
possible to assign a primary key as a foreign key too, without relying
on Model::query():
table: products [id, ...]
table: product_descriptions [id, ...]
class Product extends AppModel {
var $name = Product;
var $hasOne =
Ok my question is this. How do you associate a record from a table
without an ID tie-in. I.E. i'm developing a zencart add-on and
basically there is the following map I want to relate;
products (
products_id #main ID field
... #other fields
)
products_description ( #i've already used
On 9/19/07, axpen [EMAIL PROTECTED] wrote:
---
Basically I want to get the description field from into the products
model from the model component. That way I can work with it from the
controller component. Now if you guys know of a standard way this is
supposed to be done
Yeah I know about the foreign key thing, but that would still require
that I add an ID field to the description table, which I want to avoid
mucking with zencarts default database structure. I would make a
belongsToAndHasMany table, but that would seem silly since all the
values would be the same
On 9/19/07, axpen [EMAIL PROTECTED] wrote:
Yeah I know about the foreign key thing, but that would still require
that I add an ID field to the description table, which I want to avoid
mucking with zencarts default database structure.
No 'id field', no ability to use the built-in association
Ok then in that case what is the equivalent of $this-query from model
in the controller class, or do I have to call $model-query or
something
Thanks for you help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
On 9/19/07, axpen [EMAIL PROTECTED] wrote:
Ok then in that case what is the equivalent of $this-query from model
in the controller class, or do I have to call $model-query or
something
Thanks for you help
It's usually $this-Model-query(...) from the controller if you've
added that model to
Ok that works fine, thank you for your effort, i'll just remember in
the future that advanced model integrations with preexisting tables
will have to be done manually.
--Alex
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi!
Im in quite a fix.
I have created 2 tables as of now
users
username,id,password,name,type(owner/incharge/both),email
Primary key - id
equipment
type,equipmentno,owner,incharge,dateofpurchase
Primary key - equipmentno
Foreign Keys - owner and incharge.
The User hasMany Equipment.Equipment can
I have a couple tables I'm working with, let's just use this as an
example:
'persons' table has fields id, name, school_id, address, and coord_id
'schools' table has fields id, name, address, and coord_id
'coords' table has id, latitude, longitude
Now both people and schools have a
Hi all.
Help me how to define the association between these:
1). User has many messages
2). User has many relations
If only those, it's simply just add the User model the hasMany variable
and in Message model and Relation model just add the belongsTo
variable. But I've been thinking to make
Hi all.
I'm going to track down the user's educations so I can make
portfolio-like page for my application. The portfolio-like page will be
per user, each has the information about the user's educations.
I made the tables' relations in my database like these:
1). users: (PK)user_id + email +
Maybe this can help you:
http://wiki.cakephp.org/docs:understanding_associations
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To
Hi Brian,
You can´t create 2 associations with the same name. You can't say a
user HasOne Venue and User HABTM Venue - if you don´t give you
associations unique names the data for both will get mixed together
(with confusing results as you have seen).
Let me clarify what that means before you
Thank you! That fixed my problem perfectly!
AD7six wrote:
Hi Brian,
You can´t create 2 associations with the same name. You can't say a
user HasOne Venue and User HABTM Venue - if you don´t give you
associations unique names the data for both will get mixed together
(with confusing results
Could someone help me with this?
Brian French wrote:
I should have elaborated more. When you view that link then go to view a
particular user:
http://www.myclubbersguide.com/users/view/6
The associations dont seem to be working and i am now getting a php error.
(i have a view method in
bump
Brian French wrote:
I am having trouble associating the multiple models i have with each other.
I have a 'User' that hasOne 'Fan','Artist','Venue','Promoter'.
The 'User' also hasAndBelongsToMany of the same ones (like he can
subscribe to them as well as be one/all of them).
I am
On 9/8/06, Brian French [EMAIL PROTECTED] wrote:
I am having trouble associating the multiple models i have with each other.
I have a 'User' that hasOne 'Fan','Artist','Venue','Promoter'.
The 'User' also hasAndBelongsToMany of the same ones (like he can
subscribe to them as well as be
Scaffolding can display this for you, it's a great tool!
You can view the output here: http://www.myclubbersguide.com/users
It contains the queries being used as well as the print_r() of the
object(s).
The code for the models was in the first email/post in this thread. As
far as i understand
Hi Brian,
I took a peek at your link: I don´t quite understand what the problem
is, can you elaborate?
The sql at the foot of the page shows that sql queries are being
executed for your associations. If you look at the user test you can
see that there are results for each association type.
I should have elaborated more. When you view that link then go to view a
particular user:
http://www.myclubbersguide.com/users/view/6
The associations dont seem to be working and i am now getting a php error.
(i have a view method in the users controller, but i commented it out so
the
I am having trouble associating the multiple models i have with each other.
I have a 'User' that hasOne 'Fan','Artist','Venue','Promoter'.
The 'User' also hasAndBelongsToMany of the same ones (like he can
subscribe to them as well as be one/all of them).
I am using the scaffolding to view the
Hello, I'm new to cake and i'm having some trouble getting things done
but i'm sure i'll get used to it once I understand how certain things
work in Cake. The problem i'm having is that I cant associate different
models, like fetching data from 3 different table at the same time with
the help of
I'm having a similar problem simply trying to add comments to posts.
I've tried to get a list of comments that would be associated with a
single post by adding
$this-set('comments', $this-Comment-findAll(WHERE post_id =
'$id'));
to the view() function under posts_controller.php but that line
Gotta use model assocations - it makes this sort of thing so much nicer.
http://manual.cakephp.org/chapter/6
Looks like your Comment belongsTo Post, and probably Post hasMany
Comment.
Give the manual a look, and let me know if you have questions on it.
-- J
On May 9, 2006, at 1:47 PM,
I read through the manual in one go last week, totally forgot I had to
set up the associations myself.
Now that I've done it I can't believe how simple it is. I'm REALLY
starting to like this whole baking thing. Thanks John!
--~--~-~--~~~---~--~~
You received
101 - 134 of 134 matches
Mail list logo