cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Writing to an unmapped property
Date Wed, 12 Sep 2012 14:10:22 GMT
It supports "unmapped" properties in a Java sense of "properties". E.g.:

Artist extends _Artist {
 private int unmapped;

 public int getUnmapped() {
    return unmapped;
 }
}

There's no way to persist columns nor mapped in an ObjEntity (with the exception of generated
PKs/FK) 

Andrus

On Sep 12, 2012, at 7:56 AM, dollj@xsinet.co.za wrote:

> Hi
> 
> The API says that readNestedProperty supports both mapped and unmapped
> properties. I assume this means one can ask for eg: "db:SOME_FIELD".
> 
> Is there a way to set/write to an unmapped property ?
> 
> For eg. if I have a table with fields:  A, B and C
> And I only want A and B visible in my object entity.
> C is a "background/admin" field, but it may not be null and is variable
> like a date, user name, etc.
> 
> So now i'm trying to set C in a pre-persist / pre-update callback ?
> Can this be done or must I expose C through the object entity ?
> 
> Thanks.


Mime
View raw message