You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Tore Halset <ha...@pvv.ntnu.no> on 2009/04/11 00:01:49 UTC
how to add a column
Hello.
I am adding a DbAttribute and a ObjAttribute to the model, but there
seem to be something missing. getAttribute() on the DbEntity and
ObjEntity return the correct attributes, but SelectQueries does not
include the new column. I have tried to create a new DataContext and
clearing the cache in the EntityResolover, but still no luck.
What am I doing wrong?
Regards,
- Tore.
Re: how to add a column
Posted by Tore Halset <ha...@pvv.ntnu.no>.
On 11. april. 2009, at 21.12, Tore Halset wrote:
> Thanks for the tips, but the problem was that I cloned the DataMap.
> Fooled by my self once again..
Some more details. When I figured about the cloning, I did not even
have to clear EntityResolver cache to make queries working.
- Tore.
Re: how to add a column
Posted by Tore Halset <ha...@pvv.ntnu.no>.
Thanks for the tips, but the problem was that I cloned the DataMap.
Fooled by my self once again..
- Tore.
On 11. april. 2009, at 11.23, Andrus Adamchik wrote:
> I think ClassDescriptors fails to refresh... Looks like we need to
> reset it inside EntityResolver.clearCache() (as well as
> callbackRegistry). Could you experiment with that and commit it if
> it works?
>
> Andrus
>
>
> On Apr 11, 2009, at 1:08 AM, Tore Halset wrote:
>
>> Btw. This is all by code in runtime.
>>
>> - Tore.
>>
>> On Apr 11, 2009, at 0:01, Tore Halset <ha...@pvv.ntnu.no> wrote:
>>
>>> Hello.
>>>
>>> I am adding a DbAttribute and a ObjAttribute to the model, but
>>> there seem to be something missing. getAttribute() on the DbEntity
>>> and ObjEntity return the correct attributes, but SelectQueries
>>> does not include the new column. I have tried to create a new
>>> DataContext and clearing the cache in the EntityResolover, but
>>> still no luck.
>>>
>>> What am I doing wrong?
>>>
>>> Regards,
>>> - Tore.
>>>
>>
>
>
Re: how to add a column
Posted by Andrus Adamchik <an...@objectstyle.org>.
I think ClassDescriptors fails to refresh... Looks like we need to
reset it inside EntityResolver.clearCache() (as well as
callbackRegistry). Could you experiment with that and commit it if it
works?
Andrus
On Apr 11, 2009, at 1:08 AM, Tore Halset wrote:
> Btw. This is all by code in runtime.
>
> - Tore.
>
> On Apr 11, 2009, at 0:01, Tore Halset <ha...@pvv.ntnu.no> wrote:
>
>> Hello.
>>
>> I am adding a DbAttribute and a ObjAttribute to the model, but
>> there seem to be something missing. getAttribute() on the DbEntity
>> and ObjEntity return the correct attributes, but SelectQueries does
>> not include the new column. I have tried to create a new
>> DataContext and clearing the cache in the EntityResolover, but
>> still no luck.
>>
>> What am I doing wrong?
>>
>> Regards,
>> - Tore.
>>
>
Re: how to add a column
Posted by Tore Halset <ha...@pvv.ntnu.no>.
Btw. This is all by code in runtime.
- Tore.
On Apr 11, 2009, at 0:01, Tore Halset <ha...@pvv.ntnu.no> wrote:
> Hello.
>
> I am adding a DbAttribute and a ObjAttribute to the model, but there
> seem to be something missing. getAttribute() on the DbEntity and
> ObjEntity return the correct attributes, but SelectQueries does not
> include the new column. I have tried to create a new DataContext and
> clearing the cache in the EntityResolover, but still no luck.
>
> What am I doing wrong?
>
> Regards,
> - Tore.
>