DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Specification of <primary-key> with name often doesnt get created as such in the datastore

Created: 14/May/08 11:14 AM   Updated: 10/Dec/10 07:49 AM   Resolved: 28/Nov/10 09:51 AM
Component/s: Schema
Affects Version/s: 1.0.0.m1
Fix Version/s: 2.2.0.release

 Description  « Hide
When a user defines <primary-key name="MY_PK"> in the MetaData for a class, this PK name is often not used since the table is created using the PK specification in the CREATE TABLE statement and there is nowhere to put the PK name there. What probably should happen is is check if the PK name is defined and if so omit PK details from the CREATE TABLE, and instead add a ALTER TABLE ADD PRIMARY KEY statement with the PK name (and cols).

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 28/Nov/10 09:51 AM
SVN trunk now handles this for those RDBMS that support spec of the PK in the CREATE TABLE statement.