Hi
We use camel case for calcs, i. e. name for calc is for example companyCode. Now we got hit (by Servoy Developer). To search on such a field, it is necessary to to make it a stored calc field, so I added a database column called companycode (all lower case as Servoy corrects internally to lowercase). Servoy shows it as a stored calc in the Dataproviders… > Calculations editor, i. e. the last column has the checkbox set. But although showing it as a stored calculation, it’s not stored. As soon as I change the calc name to (all) lower case letters, it’s really getting stored in the db.
It’s either a bug in displaying it as as stored calc where it isn’t or Servoy does not not write the calcs content into the db column. I really hope it’s the latter bug, as we really want to continue to use camel case notation for calcs.
Best regards, Robert
PS2: Yes, I hear you saying don’t use camel casing, but we really would like to (for some good reasons)
All columns are internally handled lower case. So your calc name has to be lower case as well (exactly the same as the column name). That the calc displays as stored if you name it companyCode is the only bug here…
Hi Patrick
To say it in Servoy words… it’s STANDARDS based
I. e. in the OO world camel casing is the standard naming convention and therefor I don’t see as you do - as Servoy supports standards, does it?
And as Servoy already does correct to lower case, why should just calc be an exception to this?
Best regards, Robert
patrick:
All columns are internally handled lower case. So your calc name has to be lower case as well (exactly the same as the column name). That the calc displays as stored if you name it companyCode is the only bug here…
Calcs and columns are not OO but relational. As they map to databases we use lowercase notation to keep that consistent and avoid errors when mapping to relational databases.
Hi Jan
If you say so .-)
Sorry in advance, but I can’t resist to say that THE relational model (developed by E. F. Codd in 1969/70 at IBM) knows (describes) only the 4 terms domain, relation, tuple and attribute. The use of calcs has nothing to do with the relational model.
As you say Servoy already converts attributes (columns to lower case letters) so we are forced to only use lower case names, so there is no problem on the database side for either attributes or attributes used for calcs (db doesn’t know about the use). But if you already convert (force to) attributes to lower case, it’s consistent to also force calcs to lower case - what you already do currently, otherwise it wouldn’t be recognised as such with a checkbox in the Calc Editor.
So let me say then if it’s not a bug it’s a feature request ![Smile :-)]()
Thanks and best regards, Robert
Jan Aleman:
Calcs and columns are not OO but relational. As they map to databases we use lowercase notation to keep that consistent and avoid errors when mapping to relational databases.
naming convention != standard.
There are OO languages with different naming conventions – though, granted CamelCase is the defacto standard in Java/Javascript.
I use underscores in my calcs/columns, and like that it distinguishes them in my code.
greg.
Hi Greg
I meant it as you say it in detail. Camel case is the defacto standard in Java/JavaScript. Assuming the Servoy behaviour in this respect is not a bug but intended, I really feel bad as this happens:
- One can enter a camel case name as a calc name - no warning! Logical assumption, it’s valid!
- Creating a table column with the same name in lower case letters (as expected/forced by Servoy) - Stored column checkbox is checked in Calc Editor - indicating it’s recognised from Servoy as a stored calculation.
But - it doesn’t work.
Sorry, but this is in my opinion definitely not the ease of use and development speed advantage claimed by Servoy … (and I even don’t speak of what it would mean for us to change all that).
Please understand that I know to put this into perspective, but for now it could turn out as a real problem for us. I also prefer to talk about the good things we get with Servoy but hope it’s also understood as a constructive feedback if I complain about something not seen as super cool.
Regards, Robert
agiletortoise:
naming convention != standard.
There are OO languages with different naming conventions – though, granted CamelCase is the defacto standard in Java/Javascript.
I use underscores in my calcs/columns, and like that it distinguishes them in my code.
greg.
Agreed. Clearly Servoy should not allow you to use those names if they are not going to work.
greg.
The only “problem” I see in this discussion is that the column is marked as stored. So that is a little bug. Everything else is a bit “philosophic”, no?