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: Won't Fix
Priority: Minor Minor
Assignee: Unassigned
Reporter: Martin Groves
Votes: 0
Watchers: 0

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

Table autocreate hang on Postgresql when persisting an object with a reference to a previously queried instance.

Created: 26/Aug/10 03:52 PM   Updated: 17/Nov/10 09:29 PM   Resolved: 20/Sep/10 11:04 AM
Component/s: None
Affects Version/s: 2.0.1, 2.2.0.m1
Fix Version/s: None

File Attachments: 1. Zip Archive (5 kB)

Environment: OS X

Datastore: PostgreSQL
Severity: Development

 Description  « Hide
Class B contains a reference to an instance of class A.

Persisting an instance of class B after querying the database for it's referenced instance of A results in a stall.

Note: Tables A and B must not already exist.

Sort Order: Ascending order - Click to sort in descending order
Martin Groves added a comment - 26/Aug/10 03:53 PM
Test Case

Andy Jefferson added a comment - 20/Sep/10 11:04 AM
This is due to Postgresql's JDBC driver which doesn't allow DDL and normal SQL in a single txn; works in other RDBMS. Hence marking as won't fix.
Happens with the issue of the statement

The workaround is simple ... use SchemaTool before using it at runtime (as per all docs recommended practice).