cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek Šabo <ms...@buk.cvut.cz>
Subject DataObject as Beans possible?
Date Thu, 31 Dec 2009 22:26:25 GMT
Hi,

another thing, I was thinking whether it is possible or not to use 
generated dataObjects (not the underscored ones) as beans. I defined a 
constructor and filled in all attributes but when I tried to fill 
foreign key attribue (a user in reservation object) stack run into null 
pointer exception in setToOneTarget method on line 
getObjectContext().propertyChanged(this, relationshipName, oldTarget, 
value);
It is logicall that datacontext is null as I didn't want any persistance 
(and didn't create this object with newObject method) just models, the 
question is why the holdup on foreign key? Other attributes were passed 
just fine. Or how it is generally done -- e.g. there is another subset 
of beans same as dataObjects for business logic purposes or can it be 
done the way I see it? Frankly, that was the first thing that I got on 
my mind when I saw that dataObjects extending _autoClasses.

Regards

-- 
Marek Šabo
Chief Server Manager
Club SU CVUT Buben
Bubenečská Kolej
Terronská 28, Prague 16000
XMPP: zeratul021@gmail.com


Mime
View raw message