Skip to content

Commit

Permalink
Using PostgreSQLDS
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 26, 2014
1 parent 028a516 commit e1080ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/jboss/forge/website/model/Addon.java
Expand Up @@ -5,6 +5,7 @@

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
Expand All @@ -13,6 +14,7 @@
import javax.persistence.TemporalType;
import javax.persistence.Version;
import javax.xml.bind.annotation.XmlRootElement;

import java.lang.Override;

@Entity
Expand Down Expand Up @@ -44,7 +46,7 @@ public class Addon implements Serializable
private Date creationDate = new Date();

@Column
@Enumerated
@Enumerated(EnumType.ORDINAL)
private AddonSource source;

@Column
Expand Down Expand Up @@ -166,7 +168,6 @@ public void setDescription(final String description)
public String toString()
{
String result = getClass().getSimpleName() + " ";
result += "serialVersionUID: " + serialVersionUID;
if (name != null && !name.trim().isEmpty())
result += ", name: " + name;
if (authorName != null && !authorName.trim().isEmpty())
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/persistence.xml
Expand Up @@ -3,8 +3,8 @@
<persistence-unit name="website-persistence-unit" transaction-type="JTA">
<description>Forge Persistence Unit</description>
<!--Use the PostgreSQLDS when pushing to Openshift -->
<!-- <jta-data-source>java:jboss/datasources/PostgreSQLDS</jta-data-source> -->
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<jta-data-source>java:jboss/datasources/PostgreSQLDS</jta-data-source>
<!-- <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source> -->

<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
Expand Down

0 comments on commit e1080ac

Please sign in to comment.