Adding more cross references
This commit is contained in:
@@ -45,7 +45,7 @@ smtpStartTLSEnable=false
|
||||
# This affects only if Java logging is used (usually in Tomcat and WebSphere).
|
||||
# It does not affect log4j configuration (usually in JBoss or if you use log4j in your app).
|
||||
# Default value is INFO
|
||||
javaLoggingLevel=INFO
|
||||
javaLoggingLevel=FINE
|
||||
|
||||
# LOGGING LEVEL FOR HIBERNATE ENGINE
|
||||
# Possibles values are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF
|
||||
|
||||
@@ -20,9 +20,7 @@ import java.time.*;
|
||||
)
|
||||
public class Article {
|
||||
|
||||
@Id
|
||||
@Hidden
|
||||
@GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
||||
@Id @Hidden @GeneratedValue(generator="system-uuid") // Universally Unique Identifier (1)
|
||||
@GenericGenerator(name="system-uuid", strategy = "uuid")
|
||||
@Column(length=32)
|
||||
private String oid;
|
||||
@@ -34,27 +32,27 @@ public class Article {
|
||||
@Column(length=83886080)
|
||||
private byte[] photo;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY, optional=true)
|
||||
@ManyToOne
|
||||
@NoModify
|
||||
@DescriptionsList
|
||||
private Size size;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY, optional=true)
|
||||
@ManyToOne
|
||||
@NoModify
|
||||
@DescriptionsList
|
||||
private Pattern pattern;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY, optional=true)
|
||||
@ManyToOne(optional=true, fetch = FetchType.EAGER)
|
||||
@NoModify
|
||||
@DescriptionsList
|
||||
private Category category;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY, optional=true)
|
||||
@ManyToOne
|
||||
@NoModify
|
||||
@DescriptionsList
|
||||
private Brand brand;
|
||||
|
||||
@ManyToOne(fetch=FetchType.LAZY, optional=true)
|
||||
@ManyToOne
|
||||
@NoCreate
|
||||
@NoModify
|
||||
@DescriptionsList(order="${number} ASC")
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yourcompany.babydatenbank.model;
|
||||
import javax.persistence.*;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.openxava.annotations.*;
|
||||
import java.util.*;
|
||||
|
||||
@Entity
|
||||
public class Brand {
|
||||
@@ -16,6 +17,10 @@ public class Brand {
|
||||
|
||||
@Column(length=20)
|
||||
private String description;
|
||||
|
||||
@OneToMany(mappedBy="brand", fetch = FetchType.EAGER)
|
||||
@ListProperties("name, category.description")
|
||||
private Collection<Article> articles;
|
||||
|
||||
public String getOid() {
|
||||
return oid;
|
||||
@@ -32,5 +37,15 @@ public class Brand {
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Collection<Article> getArticles() {
|
||||
return articles;
|
||||
}
|
||||
|
||||
public void setArticles(Collection<Article> articles) {
|
||||
this.articles = articles;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user