openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <...@cndavies.com>
Subject RE: Schema wont create
Date Tue, 24 Nov 2009 04:49:26 GMT
Did you add the type to your persistence.xml?

Also you need to set the property:

<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />

Hth

Chris

-----Original Message-----
From: Thomas Polliard [mailto:thomas@polliard.com] 
Sent: Tuesday, 24 November 2009 3:42 PM
To: users@openjpa.apache.org
Subject: Re: Schema wont create


The files do have persisted fields:

@Entity
public class Article {
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id = -1;
	
	@ManyToOne(cascade=CascadeType.ALL)
	private Author author = null;
	
	@Basic
	private String title = null;
	
	@Basic
	private String content = null;
	
	@ManyToMany(cascade=CascadeType.ALL)
	private List<Tag> tags = new ArrayList<Tag>();
	.....

-- 
View this message in context:
http://n2.nabble.com/Schema-wont-create-tp4055690p4055835.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message