Re: [Modeling-users] fetch qualifier problem
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2003-08-09 12:43:04
|
Hi,
Could you please give an example string and the db server you use?
It must be a bug. '_' is the sql equivalent for '?' in qualifier
strings (matches one character), but it should have been escaped. We had
such pbs with postgresql which were fixed, but it seems that the
pb. remains w/ other db adaptors. AFAIK '@' shouldn't be a problem on
its own.
It could also help if you could send the generated sql statements by
setting MDL_ENABLE_DATABASE_LOGGING to true --possibly privately if
you do not want to disclose the details.
-- S=E9bastien.
Mario Ruggier <ma...@ru...> wrote:
> I have encountered this problem: if i set a string property on an entity,
> and this contains a "special" character such as _ or @, then fetch
> does the following:
>=20
> ec.EditingContext()
> aprop =3D 'a_string' # contains a special characters, e.g. _ @
> e =3D AnEntity()
> e.setAprop(aprop)
> ec.insert(e)
> ec.saveChanges()
>=20
> ec.fetch('AnEntity',qualifier=3D'aprop =3D=3D "%s"' %(aprop) ) # works fi=
ne
> ec.fetch('AnEntity',qualifier=3D'aprop ilike "*%s*"' %(aprop) ) # nada
>=20
> i.e. if i use the str value for testing equality, the fetch results are o=
k,
> but if i use it in ilike, then the fetch result list is zero length.
> Is there something i miss here, or is this a bug?
>=20
> Cheers, mario
|