Thomas Vandahl <t...@apache.org> wrote:
> On 01.10.10 21:47, Thomas Fischer wrote:
> > In my experience, it is no problem if you keep that fact in mind. It
just
> > makes the code non-portable to another database (you only query for not
> > null and know it's also not empty in oracle, but not dor other
databases).
> > Is it a problem for yaou if "" and null get mapped to the same value ?
>
> Unfortunately it is. The XML processing is different for these cases.
> Suggestions are welcome. Patch it in the template to some strange value?
> Other ideas?

I do not understand the problem well enough (perhaps you can provide a
little code example ?) but what you could do is to use the first characte
of the String in the database as a flag: "N" for null and "O" for other
(not null). You can overwrite the setters and getters such that they add
and remove the flag automatically.

You could use the template override mechanism in Torque4 to do this with
minimum impact. There is a similar example in the torque4 test project (use
the overrideConfigDir to override certain template settings). If you look
at it and there is not enough documentation just open a jira issue.

    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org

Reply via email to