cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karich <peat...@yahoo.de>
Subject Temporary Objects
Date Mon, 26 Mar 2007 19:55:25 GMT
Hallo!

My first question: How can I get the next autogenerated ID for a special
table from cayenne? Because I want that even unregistered objects can
have an ID.
DbAdapter.getPkGenerator().generatePkForDbEntity() is only good for
registered objects.
And I don't understand what DbAdapter.getPkGenerator().reset() will do.


The second question: How can I use unregistered objects?
I mean I can't do sth. like this:
TimeInterval ti = new TimeInterval();
ti.setRoom(new Room());

The Stacktrace:
java.lang.NullPointerException
at org.apache.cayenne.CayenneDataObject.setToOneTarget("room",room,true)
at caybug.TimeInterval.setRoom(TimeInterval.java:10)

Thank you,
Peter Karich.



	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Mime
View raw message