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)

Key: NUCCORE-995
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: David Nelson
Votes: 0
Watchers: 1
Operations

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

Unbound columns are not created when datanucleus.autoCreateSchema=true is set in datanucleus.properties

Created: 07/Feb/13 07:16 PM   Updated: 15/Feb/13 07:48 PM   Resolved: 15/Feb/13 03:19 PM
Component/s: Persistence
Affects Version/s: 3.2.0.m3
Fix Version/s: None

Environment: osx mountain lion, java 6

Datastore: MySQL
Severity: Development


 Description  « Hide
pom dependencies:

<dependencies>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>3.2.0-m3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jdo</artifactId>
<version>3.2.0-m3</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>3.2.0-m3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.170</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.22</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo-api</artifactId>
<version>3.1-SNAPSHOT-20120609</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0-rc1</version>
</dependency>
</dependencies>

base class fields:

@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.COMPLETE_TABLE)
public abstract class Entity<T> implements InstanceCallbacks {

  @NotPersistent
  protected DatabaseConnection databaseConnection;
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  @Column(allowsNull = "false")
  private Long id;
  @Persistent
  @Column(allowsNull = "false")
  private Long createdDate = null;
  @Persistent
  @Column(allowsNull = "false")
  private Long updatedDate = null;

root subclass fields:

@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.COMPLETE_TABLE)
public class SupplySource extends Entity<SupplySource> {

  @Column(allowsNull = "false")
  private String label;
  @Column(allowsNull = "false")
  private String filename;
  @Column(allowsNull = "false")
  private List<SupplySourceSite> sites;

relation subclass fields:

@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.COMPLETE_TABLE)
public class SupplySourceSite extends Entity<SupplySourceSite> {

  @Column(allowsNull = "false")
  private String url;
  @Column(allowsNull = "false")
  private Boolean processed;

when I run schema tool, the column:

sites_id_own

is created in the table supplysourcesites

However, when I use the auto schema creation, this column is not created.

I've tried and validated the issue with mysql, hsql, and h2.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 07/Feb/13 08:06 PM
Please attach a testcase as per http://www.datanucleus.org/project/problem_jdo_testcase.html
as mentioned on the front page of JIRA and in the DN docs

Andy Jefferson added a comment - 15/Feb/13 03:19 PM
No testcase so impossible to look at.

If this continues to be a problem (whatever it is) then you can easily re-raise WITH A VALID TESTCASE. Lack of testcase means it's your problem (to which you could easily grab the code and work out where the problem lies and propose a fix).