executing no realtionship tables

2009-07-30 Thread abhishekh


Hi, I have some static tables in my database. they have no relationship with
any other tables. That table store read only data. How do I fetch data from
that table, without writing any custom query, from any model.?
-- 
View this message in context: 
http://www.nabble.com/executing-no-realtionship-tables-tp24746659p24746659.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



HABTM query issue

2009-07-21 Thread abhishekh


profiles has many users.
users has many profiles. 

I just want to do a query which will join profiles  profiles_users table,
so i do the following:

$this-Profile-Behaviors-attach('Containable');
$this-Profile-contain(ProfilesUser);
$this-data = $this-Profile-find('all');

However, its not working, it just querying profiles table. i want something
like profiles join with profiles_users.

whats wrong??
-- 
View this message in context: 
http://www.nabble.com/HABTM-query-issue-tp24595184p24595184.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Many to Many relationship issue

2009-07-15 Thread abhishekh



Thanks for the input.

But,the relationship is this way
1) users HASBTM profiles.

1st scenario ) user can have multiple profiles. A profile can belong to
multiple user.
2nd scenrio ) even if user is not having a particular profile, he can still
follow that profile.

thats the reason there are 2 HASBTM tables. 1) users_profiles for 1st
scenario 2) followers for 2nd scenario.


womble-2 wrote:
 
 
 I'm only a cake noob, and I obviously don't know for sure about how
 your thinking of Users and Profiles.
 
 In my mind:
   User hasOne Profile
   Follower hasAndBelongsToMany Profiles (or prehaps instead of
 Profiles its Users)
 
 But User and Follower are essentially the same so in my Database
 mind..
 
 User
 user_profile : user_id, profile_id, follower (set either true/false)
 [if you can follow your own Profile then you'd also add: owner (true/
 false) ]
 Profile
  
 
 

-- 
View this message in context: 
http://www.nabble.com/Many-to-Many-relationship-issue-tp24466294p24493429.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Many to Many relationship issue

2009-07-14 Thread abhishekh


Hi, I have a quick question about Many to Many relationship works in cakephp.
I have two priamry tables.  1)users 2)profiles. There is Many to Many
relationship between these tables i.e profiles_users table. Till here its
fine.
Now, here is a new thing... I have one more Many to Many relationship
between users  profiles table. i.e followers table.
Questions, is how do i define 2 (profiles_users  followers table)Many to
Many relationship mapping in cakephp??? 
-- 
View this message in context: 
http://www.nabble.com/Many-to-Many-relationship-issue-tp24466294p24466294.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



2 many to many relationship between tables

2009-07-13 Thread abhishekh


Hi, I have a quick question about Many to Many relationship works in cakephp.
I have two priamry tables.  1)users 2)profiles. There is Many to Many
relationship between these tables i.e profiles_users table. Till here its
fine.
Now, here is a new thing... I have one more Many to Many relationship
between users  profiles table. i.e followers table.
Questions, is how do i define 2 (profiles_users  followers table)Many to
Many relationship mapping in cakephp??? 
-- 
View this message in context: 
http://www.nabble.com/2-many-to-many-relationship-between-tables-tp24467112p24467112.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---