From: Vsevolod (S. I. <si...@cs...> - 2003-12-10 21:38:21
|
Chris, I may have gotten lazy, but here is a feature that could be useful. If a certain field is not set in the object, the SQL statements that are generated to insert or update values do not contain *any* value for that field. Thus, they are syntactically invalid: update table set field1 = value1, field2 = , field3 = value3, ... Obviously, I can work around this in the application code, but it would be really cool if for fields that can be NULL SPOPS would automatically put NULL into the SQL code if the value is not defined. Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-11 08:33:21
|
* Vsevolod (Simon) Ilyushchenko (si...@cs...) [031210 16:57]: > I may have gotten lazy, but here is a feature that could be useful. If a > certain field is not set in the object, the SQL statements that are > generated to insert or update values do not contain *any* value for that > field. Thus, they are syntactically invalid: > > update table set field1 = value1, field2 = , field3 = value3, ... Oh, that's clearly wrong. > Obviously, I can work around this in the application code, but it would > be really cool if for fields that can be NULL SPOPS would automatically > put NULL into the SQL code if the value is not defined. No, you shouldn't have to work around this. I'll look into it. One note on this: the 'skip_undef' feature may help, since it will not include ANY fields in an insert or update that are undefined. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2003-12-11 20:56:10
|
> One note on this: the 'skip_undef' feature may help, since it will not > include ANY fields in an insert or update that are undefined. Chris, I tried that (assume here that field2 is undef): INSERT INTO table (field1, field2) VALUES (value1, ); So it fails too. :( I think this and the previous bug only happens with numeric fiels. Thanks, Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |
From: Chris W. <ch...@cw...> - 2003-12-12 11:33:02
|
* Vsevolod (Simon) Ilyushchenko (si...@cs...) [031211 16:13]: > >One note on this: the 'skip_undef' feature may help, since it will not > >include ANY fields in an insert or update that are undefined. > > I tried that (assume here that field2 is undef): > > INSERT INTO table (field1, field2) VALUES (value1, ); > > So it fails too. :( > > I think this and the previous bug only happens with numeric fiels. I think the 'skip_undef' part gets triggered before they get to SPOPS::SQLInterface and thus before the datatypes are checked. So I'm not sure this is a type issue (could be wrong). In any case, I will clearly have to investigate this some more and write some tests to exercise the behavior. More soon, thanks for the report. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: Teemu A. <te...@io...> - 2003-12-15 12:17:32
|
Hello, I was playing around with OpenInteract themes and noticed something that should work differently in my opinion (maybe a bug?): In server.ini I have default_objects.theme = 2 I have two users, superuser and testuser. superuser has theme_id = 1 in the sys_user table and testuser has theme_id = 2. Now, when I set session_info.cache_theme = 30 in the server.ini and log in as testuser, I get theme id 2. Now I log off and log back in as superuser. I get theme id 2 instead of theme id 1 (?) I set session_info.cache_theme = 0 and try the same procedure again. Now superuser gets the correct theme id 1. It seems like when cache is turned on, I get the theme which was cached first, no matter if that theme was for another user. The only way to work around this problem I have found so far is turning off theme caching. Is this a bug or a feature? -- Sincerely, Teemu Arina www.mimerdesk.org |
From: Chris W. <ch...@cw...> - 2003-12-15 14:05:48
|
Teemu Arina wrote: > I was playing around with OpenInteract themes and noticed something that > should work differently in my opinion (maybe a bug?): > > In server.ini I have default_objects.theme = 2 > > I have two users, superuser and testuser. superuser has theme_id = 1 in the > sys_user table and testuser has theme_id = 2. > > Now, when I set session_info.cache_theme = 30 in the server.ini and log in as > testuser, I get theme id 2. That's okay... > Now I log off and log back in as superuser. I get theme id 2 instead of theme > id 1 (?) That's not. The session data aren't being cleared out, it sounds like. That's definitely a bug. I'll look into it. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |