Hello!
I currently want to use Cayenne in my project and am in the process of exploring Cayenne.But then I have got stuck up now with one exception. I am using DB2 as the database. The thing is the tables I am doing the project on,doesnt have a primary key.As a result, I tried to use the Auto PK generation feature in Cayenne Modeller(tick marking the necessary column in the Attributes table and generating schema). But whatever I do, I get the following exception
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1M4 March 5 2004] Can't create ObjectId for 'Books'. Reason: DbEntity 'BOOKS' has no Primary Key defined.
at org.objectstyle.cayenne.access.DataContext.objectsFromDataRows(DataContext.java:614)
at org.objectstyle.cayenne.access.util.SelectObserver.getResultsAsObjects(SelectObserver.java:190)
at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1200)
at BookCheck.getBook(Bookcheck.java:38)
at BookCheck.main(Bookcheck.java:28)
Exception in thread "main"
I searched for possible solutions in the mailing lists but I was not able to find any solution..Any pointers would be helpful.
Thanks in Advance!
---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
This archive was generated by hypermail 2.0.0 : Mon Apr 12 2004 - 10:05:24 EDT