[Helma-user] SQL Exception when creating a new Object and checking if a collection is present
Michael Platzer
michael.platzer at knallgrau.at
Mon Feb 5 00:27:33 CET 2007
Franz Philipp Moser schrieb:
> I found out that when helma creates new Objects, it sets the _id to
> something like t + number (t1, t2, ...)
>
> Because of that the SQL goes wrong.
>
> Now I have to check if the Object was newly created:
> {{{
> var newRecord = isNaN(parseInt(this._id, 10));
> }}}
>
> Is this standard behavior or a feature? Shouldn't this be changed?
>
This is afaik standard behavior. We wrote a little global helper method,
which might also be helpful for you.
function isObjectPersistent(obj) {
if (!obj || obj._id.substring(0,1) == "t")
return false;
else
return true;
}
greets,
michi
More information about the Helma-user
mailing list