Re: Upgrading 1.0rc3 to 1.5 and Boolean fields queries
Hi Mohammed, This query is generated in both reviews/managers.py and reviews/datagrids.py. In these cases, it's raw SQL, so you should be able to easily modify that. Preferably, we'd move away from raw SQL now that Django has support for F() expressions (things like field_name = field_name + 1 and stuff, which it couldn't do before). But a quick fix would be to just do the = 1 on those queries. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, Oct 18, 2010 at 8:01 AM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: I am trying to upgrade our RB from 1.0rc3 to 1.5. We are running on top of a SQLAnywhere database server. I got the database upgraded successfully, but when I try to access the site it gives me errors regarding badly generated SQL queries. The problem is with the reviews_review.public field. This field is a Boolean field. The query that is generated by RB looks as follows: SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public AND ... In the SQLAnywhere Django driver, Boolean fields are mapped to BIT fields on the database side. As such, the correct query above should have been SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public = 1 AND ... I am inheriting this system so I am still learning both Django and RB. What component is responsible for generating the correct syntax for Boolean fields? -- Mohammed -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Upgrading 1.0rc3 to 1.5 and Boolean fields queries
Hi Christian, Thanks, that did solve my problem ... but it made me wonder how other backend drivers, namely Oracle, handled this SQL without = 1 ? -- Mohammed On Oct 18, 3:31 pm, Christian Hammond chip...@chipx86.com wrote: Hi Mohammed, This query is generated in both reviews/managers.py and reviews/datagrids.py. In these cases, it's raw SQL, so you should be able to easily modify that. Preferably, we'd move away from raw SQL now that Django has support for F() expressions (things like field_name = field_name + 1 and stuff, which it couldn't do before). But a quick fix would be to just do the = 1 on those queries. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 8:01 AM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: I am trying to upgrade our RB from 1.0rc3 to 1.5. We are running on top of a SQLAnywhere database server. I got the database upgraded successfully, but when I try to access the site it gives me errors regarding badly generated SQL queries. The problem is with the reviews_review.public field. This field is a Boolean field. The query that is generated by RB looks as follows: SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public AND ... In the SQLAnywhere Django driver, Boolean fields are mapped to BIT fields on the database side. As such, the correct query above should have been SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public = 1 AND ... I am inheriting this system so I am still learning both Django and RB. What component is responsible for generating the correct syntax for Boolean fields? -- Mohammed -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Upgrading 1.0rc3 to 1.5 and Boolean fields queries
Hi, To my knowledge, nobody is using Oracle. rb-site doesn't provide it as an option, and we don't have a license with which to test. Most people so far have been using MySQL and PostgreSQL. Is the Sybase driver becoming public, and will it be part of Django in the future? Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, Oct 18, 2010 at 1:49 PM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: Hi Christian, Thanks, that did solve my problem ... but it made me wonder how other backend drivers, namely Oracle, handled this SQL without = 1 ? -- Mohammed On Oct 18, 3:31 pm, Christian Hammond chip...@chipx86.com wrote: Hi Mohammed, This query is generated in both reviews/managers.py and reviews/datagrids.py. In these cases, it's raw SQL, so you should be able to easily modify that. Preferably, we'd move away from raw SQL now that Django has support for F() expressions (things like field_name = field_name + 1 and stuff, which it couldn't do before). But a quick fix would be to just do the = 1 on those queries. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 8:01 AM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: I am trying to upgrade our RB from 1.0rc3 to 1.5. We are running on top of a SQLAnywhere database server. I got the database upgraded successfully, but when I try to access the site it gives me errors regarding badly generated SQL queries. The problem is with the reviews_review.public field. This field is a Boolean field. The query that is generated by RB looks as follows: SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public AND ... In the SQLAnywhere Django driver, Boolean fields are mapped to BIT fields on the database side. As such, the correct query above should have been SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public = 1 AND ... I am inheriting this system so I am still learning both Django and RB. What component is responsible for generating the correct syntax for Boolean fields? -- Mohammed -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com reviewboard%2bunsubscr...@googlegroups.comreviewboard%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Upgrading 1.0rc3 to 1.5 and Boolean fields queries
Yes, the SQLAnywhere database server driver is public (http:// code.google.com/p/sqlany-django/) but it will take some time before it becomes a standard part of the Django release. We will be actively maintaining and updating it. -- Mohammed On Oct 18, 5:57 pm, Christian Hammond chip...@chipx86.com wrote: Hi, To my knowledge, nobody is using Oracle. rb-site doesn't provide it as an option, and we don't have a license with which to test. Most people so far have been using MySQL and PostgreSQL. Is the Sybase driver becoming public, and will it be part of Django in the future? Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 1:49 PM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: Hi Christian, Thanks, that did solve my problem ... but it made me wonder how other backend drivers, namely Oracle, handled this SQL without = 1 ? -- Mohammed On Oct 18, 3:31 pm, Christian Hammond chip...@chipx86.com wrote: Hi Mohammed, This query is generated in both reviews/managers.py and reviews/datagrids.py. In these cases, it's raw SQL, so you should be able to easily modify that. Preferably, we'd move away from raw SQL now that Django has support for F() expressions (things like field_name = field_name + 1 and stuff, which it couldn't do before). But a quick fix would be to just do the = 1 on those queries. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 8:01 AM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: I am trying to upgrade our RB from 1.0rc3 to 1.5. We are running on top of a SQLAnywhere database server. I got the database upgraded successfully, but when I try to access the site it gives me errors regarding badly generated SQL queries. The problem is with the reviews_review.public field. This field is a Boolean field. The query that is generated by RB looks as follows: SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public AND ... In the SQLAnywhere Django driver, Boolean fields are mapped to BIT fields on the database side. As such, the correct query above should have been SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public = 1 AND ... I am inheriting this system so I am still learning both Django and RB. What component is responsible for generating the correct syntax for Boolean fields? -- Mohammed -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com reviewboard%2bunsubscr...@googlegroups.comreviewboard%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Upgrading 1.0rc3 to 1.5 and Boolean fields queries
Awesome :) If you guys wanted to give us a patch to rb-site to support it, we'll include it (provided that you can easy_install the module). Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, Oct 18, 2010 at 4:46 PM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: Yes, the SQLAnywhere database server driver is public (http:// code.google.com/p/sqlany-django/) but it will take some time before it becomes a standard part of the Django release. We will be actively maintaining and updating it. -- Mohammed On Oct 18, 5:57 pm, Christian Hammond chip...@chipx86.com wrote: Hi, To my knowledge, nobody is using Oracle. rb-site doesn't provide it as an option, and we don't have a license with which to test. Most people so far have been using MySQL and PostgreSQL. Is the Sybase driver becoming public, and will it be part of Django in the future? Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 1:49 PM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: Hi Christian, Thanks, that did solve my problem ... but it made me wonder how other backend drivers, namely Oracle, handled this SQL without = 1 ? -- Mohammed On Oct 18, 3:31 pm, Christian Hammond chip...@chipx86.com wrote: Hi Mohammed, This query is generated in both reviews/managers.py and reviews/datagrids.py. In these cases, it's raw SQL, so you should be able to easily modify that. Preferably, we'd move away from raw SQL now that Django has support for F() expressions (things like field_name = field_name + 1 and stuff, which it couldn't do before). But a quick fix would be to just do the = 1 on those queries. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Mon, Oct 18, 2010 at 8:01 AM, Mohammed Abouzour [Sybase] abouz...@gmail.com wrote: I am trying to upgrade our RB from 1.0rc3 to 1.5. We are running on top of a SQLAnywhere database server. I got the database upgraded successfully, but when I try to access the site it gives me errors regarding badly generated SQL queries. The problem is with the reviews_review.public field. This field is a Boolean field. The query that is generated by RB looks as follows: SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public AND ... In the SQLAnywhere Django driver, Boolean fields are mapped to BIT fields on the database side. As such, the correct query above should have been SELECT COUNT(*) FROM reviews_review, ... WHERE reviews_review.public = 1 AND ... I am inheriting this system so I am still learning both Django and RB. What component is responsible for generating the correct syntax for Boolean fields? -- Mohammed -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com reviewboard%2bunsubscr...@googlegroups.comreviewboard%252bunsubscr...@googlegroups.com reviewboard%2bunsubscr...@googlegroups.comreviewboard%252bunsubscr...@googlegroups.com reviewboard%252bunsubscr...@googlegroups.comreviewboard%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com reviewboard%2bunsubscr...@googlegroups.comreviewboard%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/