Re: entities with calculated fields

From: Malcolm Edgar (malcolm.edga..mail.com)
Date: Mon Feb 19 2007 - 04:13:33 EST

  • Next message: Andrus Adamchik: "Re: entities with calculated fields"

    Hi Aristedes,

    I think Andrus is the right person to answer your question, but I do
    recall a conversation where the intention was for derived dbentities
    to be removed.

    SQLTemplate can also work with data objects, just need to make sure
    the object properties match the returned column names. The SQL
    template has a nice facility to support multiple database versions as
    well.

    regards Malcolm Edgar

    On 2/19/07, Aristedes Maniatis <ar..sh.com.au> wrote:
    >
    > 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
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Feb 19 2007 - 04:14:04 EST