[web2py] Re: Associative Table

2012-02-18 Thread Tom Nurkkala
On Feb 15, 8:14 pm, pbreit pbreitenb...@gmail.com wrote:
 I don't believe so. Is there any reason you need to avoid that column? You
 should be able to disregard it fairly easily.

Simply that it's not necessary to express a many-to-many relationship.
It's not a big deal. Thanks for the feedback!


[web2py] Re: Associative Table

2012-02-16 Thread Ross Peoples
Good practice says you should ALWAYS have an identity (ID) field, even if 
you don't use it.

[web2py] Re: Associative Table

2012-02-16 Thread Cliff
If you want to avoid duplicate associations, check out
update_or_insert.

http://web2py.com/books/default/chapter/29/6#update_or_insert

In raw SQL you would use the two associated IDs as the primary key,
then use ON DUPLICATE KEY to trap the error.

On Feb 16, 8:09 am, Ross Peoples ross.peop...@gmail.com wrote:
 Good practice says you should ALWAYS have an identity (ID) field, even if
 you don't use it.


[web2py] Re: Associative Table

2012-02-15 Thread pbreit
I don't believe so. Is there any reason you need to avoid that column? You 
should be able to disregard it fairly easily.

[web2py] Re: Associative Table

2012-02-15 Thread Anthony
Check 
out 
http://web2py.com/books/default/chapter/29/6#Legacy-databases-and-keyed-tables 
-- probably not advisable.

On Wednesday, February 15, 2012 7:16:59 PM UTC-5, Tom Nurkkala wrote:

 When creating a simple associative table between two (or more) other 
 tables, is there a way to tell web2py not to create the ID field? 

 thanks, 
 tom.



[web2py] Re: Associative Table

2012-02-15 Thread lyn2py
Agree with the Anthony. Not advisable.

On Feb 16, 9:19 am, Anthony abasta...@gmail.com wrote:
 Check
 outhttp://web2py.com/books/default/chapter/29/6#Legacy-databases-and-key...
 -- probably not advisable.







 On Wednesday, February 15, 2012 7:16:59 PM UTC-5, Tom Nurkkala wrote:

  When creating a simple associative table between two (or more) other
  tables, is there a way to tell web2py not to create the ID field?

  thanks,
  tom.