Re: [Modeling-users] quoting entity and attribute names
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2004-06-23 17:55:54
|
John Lenton <jo...@vi...> wrote: > In a project I'm currently working on there is a class that we'd like > to call "User", but we can't call it that and use Modeling in its > current state: it's not quoting the names of entities (nor > attributes), and user is a reserved word. >=20 > I looked into it, and I actually got it working, but I then saw that > in SQLExpression there's a method `externalNameQuoteCharacter'; is the > purpose of this method to be used (something like) this: >=20 > [ in _addTableJoinsForAlias ] >=20 > quoteChar =3D self.externalNameQuoteCharacter() > str +=3D quoteChar + self._internals.entityExternalNameForAlias(alias= ) + quoteChar + ' ' + alias >=20 > ? And to answer this very precisely, I do not feel really comfortable with quoting external names when unneeded; the quoting should IMHO be done only when a whole SQL statement is returned, not during intermediate steps. This makes assembleDelete|Select|UpdateStatement() methods good candidates, doesn't it? -- S=E9bastien. |