From addf7c2f62c8a789586711105715683776ea5809 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Thu, 3 Dec 2009 11:19:04 -0500 Subject: add fk's for cp_consumer_products and cp_consumer_entitlements --- proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java') diff --git a/proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java b/proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java index f1d3335..3ffea28 100644 --- a/proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java +++ b/proxy/code/src/org/fedoraproject/candlepin/model/Consumer.java @@ -80,14 +80,16 @@ public class Consumer { // Separate mapping because in theory, a consumer could be consuming products they're // not entitled to. @ManyToMany - @ForeignKey(name = "fk_consumer_product_consumer_id", - inverseName = "fk_consumer_product_product_id") + @ForeignKey(name="fk_consumer_product_consumer_id", + inverseName="fk_consumer_product_product_id") @JoinTable(name="cp_consumer_products", joinColumns=@JoinColumn(name="consumer_id"), inverseJoinColumns=@JoinColumn(name="product_id")) private Set consumedProducts; @OneToMany + @ForeignKey(name="fk_consumer_product_consumer_id", + inverseName="fk_consumer_produce_product_id") @JoinTable(name="cp_consumer_entitlements", joinColumns=@JoinColumn(name="consumer_id"), inverseJoinColumns=@JoinColumn(name="entitlement_id")) -- cgit