Welcome Guest  |  Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help


Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 215 times and has 2 replies Next Thread
Male pinepeng
Newbie



China
Joined: Jan 4, 2010
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Identity problem.

The datanucleus schema tool occurs a error when using the identity propertity in my database(my database is not inclued in DB2, MYSQL, SyBase, HSQLDB, H2, PostgreSQL ),the error is :


DataNucleus SchemaTool (version 2.0.0-m4) : Creation of the schema

An exception was thrown during the operation of SchemaTool. Please refer to the log for full details. The following may help : Class "org.datanucleus.samples.jpa.tutorial.Product" has field "id" specified as using autoassign/identity, yet the RDBMS in use doesnt support this feature.

The development IDE: MyEclipse 5.5
The product source is in accesary.

I would like to know whether the datanucleus just suportes auto-increment/identity/serial keys for DB2, MySQL, Sybase, HSQLDB, H2 and PostgreSQL not for other database, if not, the datanucleus is how to support identity property or other databases whether support some datanuleus API.

Thank you very much!
[Mar 5, 2010 2:51:37 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male andy
Expert
Member's Avatar

UK
Joined: Mar 13, 2004
Post Count: 5376
Status: Offline
Reply to this Post  Reply with Quote 
Re: Identity problem.

So the datastore adapter you're using doesn't support identity. If you wanted to provide support for that datastore (which you don't say what it is) then you go to the relevant plugin-point
http://www.datanucleus.org/extensions/datastore_adapter.html
and provide a datastore adapter (look at SVN for the most recent version of DatabaseAdapter which you extend from), and implement the methods about Identity/AutoIncrement. Then when you've implemented it, you can donate it to the project
----------------------------------------
-Andy smile

[Mar 6, 2010 9:44:18 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Female xuewwy
Newbie



China
Joined: Mar 9, 2010
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Identity problem.

I wonder how the DataNucleus know whether the RDBMS in use supports GenerationType.IDENTITY
[Mar 9, 2010 6:50:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread