Re: Problem with HBTM tables. (included image)

2009-08-05 Thread Carlos Suarez Fontalvo

David I have one more question. when you said that is The PK in this
model, it is really the PK or the FK. I have this doubt

On 28 jul, 16:17, Carlos Suarez Fontalvo eng.carlos.sua...@gmail.com
wrote:
 tnx david, i'll do that tonight. ihopethis works. I think weall
 need to do an example biblio of this really nasty troubles.

 On Jul 28, 11:52 am, DavidH djhollingwo...@gmail.com wrote:

  Hi Carlos

  Why can't you follow the standard HABTM setup by inserting thenames
  of you key columns where appropriate? Something like:

  class Modulo extends AppModel {
  
  var $hasAndBelongsToMany = array(
    'TipoUsuario' = array(
      'classname' = 'TipoUsuario',
      'foreignKey' = 'modulo', // The PK column in this model
      'associationForeignKey' = 'tipousauario', // The PK column in the
  other model
      'joinTable' = 'TipoUsuarioModulo'
    )
  );

  In your TipoUsuario model you'll have a similar HABTM definition with
  the same joinTable; but the other fields replaced by their modulo
  equivalents.

  Ihopethis works for you.

  Regards

  David

 PSIhopeI'vespeltallthefieldnamescorrectly.

  On Jul 28, 5:00 pm, Carlos Suarez Fontalvo

  eng.carlos.sua...@gmail.com wrote:
   Hello, tnx for the ans, but, i already put the images in my questions,
   and about that, what i need is precisely that data (i need to know for
   a HABTM relationship the jointable, foreignkey, assforkey) for doing
   the rest.

   I apreciate your help.

   On Jul 27, 3:17 pm, Piotr Kilczuk kilc...@gmail.com wrote:

Hello,

 Excuse me, but, nobody has answer me. It's anyone here can help me?.
 tnx a lot.

In this case I'm pretty sure that you have to define additional HABTM
keys in TipoUsuario and Modulo - I mean:
joinTable, foreignKey, associationForeignKey. Just get one model
association working 1st, and then you'll get the pattern.

HTH

Regards,
Piotr
--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-28 Thread Carlos Suarez Fontalvo

Hello, tnx for the ans, but, i already put the images in my questions,
and about that, what i need is precisely that data (i need to know for
a HABTM relationship the jointable, foreignkey, assforkey) for doing
the rest.

I apreciate your help.

On Jul 27, 3:17 pm, Piotr Kilczuk kilc...@gmail.com wrote:
 Hello,

  Excuse me, but, nobody has answer me. It's anyone here can help me?.
  tnx a lot.

 In this case I'm pretty sure that you have to define additional HABTM
 keys in TipoUsuario and Modulo - I mean:
 joinTable, foreignKey, associationForeignKey. Just get one model
 association working 1st, and then you'll get the pattern.

 HTH

 Regards,
 Piotr
--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-28 Thread DavidH

Hi Carlos

Why can't you follow the standard HABTM setup by inserting the names
of you key columns where appropriate? Something like:

class Modulo extends AppModel {

var $hasAndBelongsToMany = array(
  'TipoUsuario' = array(
'classname' = 'TipoUsuario',
'foreignKey' = 'modulo', // The PK column in this model
'associationForeignKey' = 'tipousauario', // The PK column in the
other model
'joinTable' = 'TipoUsuarioModulo'
  )
);

In your TipoUsuario model you'll have a similar HABTM definition with
the same joinTable; but the other fields replaced by their modulo
equivalents.

I hope this works for you.

Regards

David

PS I hope I've spelt all the field names correctly.


On Jul 28, 5:00 pm, Carlos Suarez Fontalvo
eng.carlos.sua...@gmail.com wrote:
 Hello, tnx for the ans, but, i already put the images in my questions,
 and about that, what i need is precisely that data (i need to know for
 a HABTM relationship the jointable, foreignkey, assforkey) for doing
 the rest.

 I apreciate your help.

 On Jul 27, 3:17 pm, Piotr Kilczuk kilc...@gmail.com wrote:

  Hello,

   Excuse me, but, nobody has answer me. It's anyone here can help me?.
   tnx a lot.

  In this case I'm pretty sure that you have to define additional HABTM
  keys in TipoUsuario and Modulo - I mean:
  joinTable, foreignKey, associationForeignKey. Just get one model
  association working 1st, and then you'll get the pattern.

  HTH

  Regards,
  Piotr
--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-28 Thread Carlos Suarez Fontalvo

tnx david, i'll do that tonight. i hope this works. I think we all
need to do an example biblio of this really nasty troubles.

On Jul 28, 11:52 am, DavidH djhollingwo...@gmail.com wrote:
 Hi Carlos

 Why can't you follow the standard HABTM setup by inserting the names
 of you key columns where appropriate? Something like:

 class Modulo extends AppModel {
 
 var $hasAndBelongsToMany = array(
   'TipoUsuario' = array(
     'classname' = 'TipoUsuario',
     'foreignKey' = 'modulo', // The PK column in this model
     'associationForeignKey' = 'tipousauario', // The PK column in the
 other model
     'joinTable' = 'TipoUsuarioModulo'
   )
 );

 In your TipoUsuario model you'll have a similar HABTM definition with
 the same joinTable; but the other fields replaced by their modulo
 equivalents.

 I hope this works for you.

 Regards

 David

 PS I hope I've spelt all the field names correctly.

 On Jul 28, 5:00 pm, Carlos Suarez Fontalvo

 eng.carlos.sua...@gmail.com wrote:
  Hello, tnx for the ans, but, i already put the images in my questions,
  and about that, what i need is precisely that data (i need to know for
  a HABTM relationship the jointable, foreignkey, assforkey) for doing
  the rest.

  I apreciate your help.

  On Jul 27, 3:17 pm, Piotr Kilczuk kilc...@gmail.com wrote:

   Hello,

Excuse me, but, nobody has answer me. It's anyone here can help me?.
tnx a lot.

   In this case I'm pretty sure that you have to define additional HABTM
   keys in TipoUsuario and Modulo - I mean:
   joinTable, foreignKey, associationForeignKey. Just get one model
   association working 1st, and then you'll get the pattern.

   HTH

   Regards,
   Piotr
--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-27 Thread Carlos Suarez Fontalvo

Excuse me, but, nobody has answer me. It's anyone here can help me?.
tnx a lot.
--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-27 Thread Jaydeep Dave
Brother, I don't know your problem.  But you can try this.
http://www.google.co.in/search?rlz=1C1CHNG_enIN333IN333sourceid=chromeie=UTF-8q=HBTM

On Mon, Jul 27, 2009 at 11:33 AM, Carlos Suarez Fontalvo 
eng.carlos.sua...@gmail.com wrote:


 Excuse me, but, nobody has answer me. It's anyone here can help me?.
 tnx a lot.
 



-- 
Regards,

Jaydeep Dave
Mobile: +919898456445
Email: jaydipd...@yahoo.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: Problem with HBTM tables. (included image)

2009-07-27 Thread Piotr Kilczuk

Hello,

 Excuse me, but, nobody has answer me. It's anyone here can help me?.
 tnx a lot.

In this case I'm pretty sure that you have to define additional HABTM
keys in TipoUsuario and Modulo - I mean:
joinTable, foreignKey, associationForeignKey. Just get one model
association working 1st, and then you'll get the pattern.

HTH


Regards,
Piotr

--~--~-~--~~~---~--~~
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: Problem with HBTM tables. (included image)

2009-07-23 Thread Carlos Suarez Fontalvo

pliz, if there is one here can help me, i'll apreciated a lot.

On Jul 22, 10:03 am, Carlos Suarez Fontalvo
eng.carlos.sua...@gmail.com wrote:
 I have a problem when trying to identify the HBTM arguments for this
 relatioship.
 The table is this one:http://tinyurl.com/mwq9q6
 I know, that the table doen't follow cakephp conventions, but for this
 reason its because I cannot identify the HBTM parameters.
 The image above show 3 important tables. these are: TipoUsuario,
 TipoUsuarioModulo, Modulo.

 I wanna identify the HBTM association in TipoUsuario y Modulo.
 This is what i don't how to configure it in my models

 Here is the link:http://paste.ideaslabs.com/show/OADWeqUcbQ

 I cannot identify the jointable, foreignKey, associationForeignKey, in
 TipoUsuario and Modulo models.

 I also wanna know if my TipoUsuarioModulo model y right. here is the
 TipoUsuarioModulo model code.

 Here is the link:http://paste.ideaslabs.com/show/g8CtwdJU1V

 Greetings for any ideas that help me to solve this problem.

 my email is ing.carlos.s at gmail dot 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
-~--~~~~--~~--~--~---



Problem with HBTM tables. (included image)

2009-07-22 Thread Carlos Suarez Fontalvo

I have a problem when trying to identify the HBTM arguments for this
relatioship.
The table is this one:
http://tinyurl.com/mwq9q6
I know, that the table doen't follow cakephp conventions, but for this
reason its because I cannot identify the HBTM parameters.
The image above show 3 important tables. these are: TipoUsuario,
TipoUsuarioModulo, Modulo.

I wanna identify the HBTM association in TipoUsuario y Modulo.
This is what i don't how to configure it in my models

Here is the link: http://paste.ideaslabs.com/show/OADWeqUcbQ

I cannot identify the jointable, foreignKey, associationForeignKey, in
TipoUsuario and Modulo models.

I also wanna know if my TipoUsuarioModulo model y right. here is the
TipoUsuarioModulo model code.

Here is the link: http://paste.ideaslabs.com/show/g8CtwdJU1V


Greetings for any ideas that help me to solve this problem.

my email is ing.carlos.s at gmail dot 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
-~--~~~~--~~--~--~---