Re: error building Expressions: Can't resolve path component
Zvonimir Spajic <z.spajic <at> ascensys.de>
2005-05-02 15:00:08 GMT
thank you Cris,
thank you Andrus,
it helps.
Zvonimir
On Mon, 2 May 2005 09:35:07 -0400, Cris Daniluk
<cris.daniluk <at> claraview.com> wrote:
> Zvonimir,
>
> If you only have the category id and not the actual Category object, I
> personally like to retrieve the object separately using DataObjectUtils
> (pragmatically, you need to use the pk from time to time, but the less
> time
> you spend internally communicating with pks, the better). This lets you
> use
> the method Andrus recommended. It might be an extra step, but it pays
> dividends in terms of clean code. On top of that, it may not even
> trigger a
> db lookup!
>
> An example:
>
> Category category = (Category) DataObjectUtils.objectForPk(context,
> Category.class, categoryId);
>
> Hope that helps,
>
(Continue reading)