cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@ish.com.au>
Subject Re: entities with calculated fields
Date Mon, 19 Feb 2007 08:56:47 GMT

On 15/02/2007, at 10:48 PM, Juergen Saar wrote:

> For solving such kind of problem,
> we created views in the database.

Thanks for this note. In our case we want to avoid that mainly  
because we want to maintain compatibility with different databases   
I'd rather do this in Cayenne. Now I understand we can create an  
SQLTemplate and work with raw data rows, but that comes with a few  
inconveniences.

Today I stumbled on 'derived dbentities'. I could find nothing in the  
documentation about them and not a lot in Javadocs. My questions  
about them are:

* are they a fully support Cayenne feature which is sticking around  
in the long term?
* what does "%@" mean in the spec column and what else can I put  
there? Can I put "COUNT(SELECT some other table)" there?
* if I add extra fields to the derived entity are they then simply  
ignored for the purpose of committing data back to the database?
* can I now point my objEntity to this derived dbEntity instead of  
the original 'real' dbEntity? Will everything continue to work as  
before except I get to use a couple of new virtual fields? If that is  
the case, why do we even need derived dbEntities and why can't we  
just add additional virtual fields to the 'real' dbEntity?

Sorry for lots of questions, but I'd like to understand these thing  
better since they look like they might be really useful.


Ari Maniatis



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Mime
View raw message