caribou / caribou-core

Core functionality for Caribou
44 stars 3 forks source link

Deletion Issue #8

Closed b-outlaw closed 12 years ago

b-outlaw commented 12 years ago

I tried to delete a 'person' in Support Your Local and this is what I got.

Stacktrace:

action: list-all => {:slug "model", :include "fields.link"}
db: select fields.target_id as fields$target_id, model.position as model$position, model.locked as model$locked, link.target_id as link$target_id, model.created_at as model$created_at, model.name as model$name, model.slug as model$slug, model.id as model$id, fields.description as fields$description, link.position as link$position, fields.model_id as fields$model_id, link.description as link$description, fields.searchable as fields$searchable, link.disjoint as link$disjoint, link.searchable as link$searchable, link.locked as link$locked, link.name as link$name, link.slug as link$slug, link.id as link$id, link.model_id as link$model_id, link.type as link$type, fields.position as fields$position, fields.editable as fields$editable, fields.created_at as fields$created_at, fields.required as fields$required, link.editable as link$editable, link.singular as link$singular, fields.locked as fields$locked, fields.name as fields$name, fields.slug as fields$slug, fields.id as fields$id, fields.tyorg.postgresql.util.PSQLException: ERROR: table name "views_join" specified more than once
pe as fields$type, fields.disjoint as fields$disjoint, fields.model_position as fields$model_position, fields.singular as fields$singular, link.updated_at as link$updated_at, link.required as link$required, link.model_position as link$model_position, fields.updated_at as fields$updated_at, link.created_at as link$created_at, fields.dependent as fields$dependent, link.dependent as link$dependent, fields.link_id as fields$link_id, link.link_id as link$link_id, model.abstract as model$abstract, model.searchable as model$searchable, fields.immutable as fields$immutable, fields.default_value as fields$default_value, link.immutable as link$immutable, link.default_value as link$default_value, model.join_model as model$join_model, model.updated_at as model$updated_at, model.description as model$description, model.nested as model$nested, model.ancestor_id as model$ancestor_id from model model left outer join field fields on (model.id = fields.model_id) left outer join field link on (fields.link    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
    at clojure.java.jdbc.internal$with_query_results_STAR_.invoke(internal.clj:328)
    at caribou.db$query.doInvoke(db.clj:41)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at caribou.model$uberquery.invoke(model.clj:1399)
    at caribou.model$gather.invoke(model.clj:1448)
    at caribou.model$find_all.invoke(model.clj:1503)
    at caribou.model$find_one.invoke(model.clj:1508)
    at caribou.api.core$content_item.invoke(core.clj:40)
    at caribou.api.core$item_detai_id = link.id) where model.id in (select model.id from model model limit 30 offset 0) order by model.position asc, fields.model_position asc
db: select count(id) from model
action: item-detail => {:slug "person", :id "34", :include "subscriptions,comment_thread,activity,rewards_join,subscriptions_join,rewards,views_join,role,comments,views"}
error: error rendering /person/34: org.postgresql.util.PSQLException: ERROR: table name "views_join" specified more than once
l.invoke(core.clj:227)
    at caribou.api.core$init$fn__1518.invoke(core.clj:308)
    at compojure.core$make_route$fn__319.invoke(core.clj:93)
    at compojure.core$if_route$fn__307.invoke(core.clj:39)
    at compojure.core$if_method$fn__300.invoke(core.clj:24)
    at compojure.core$routing$fn__325.invoke(core.clj:106)
    at clojure.core$some.invoke(core.clj:2388)
    at compojure.core$routing.doInvoke(core.clj:106)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.core$apply.invoke(core.clj:602)
    at compojure.core$routes$fn__329.invoke(core.clj:111)
    at ring.middleware.keyword_params$wrap_keyword_params$fn__803.invoke(keyword_params.clj:27)
    at ring.middleware.nested_params$wrap_nested_params$fn__840.invoke(nested_params.clj:65)
    at ring.middleware.params$wrap_params$fn__777.invoke(params.clj:55)
    at ring.middleware.multipart_params$wrap_multipart_params$fn__866.invoke(multipart_params.clj:103)
    at ring.middleware.flash$wrap_flash$fn__1035.invoke(flash.clj:14)
    at ring.middleware.session$wrap_session$fn__1028.invoke(session.clj:40)
    at ring.middleware.cookies$wrap_cookies$fn__965.invoke(cookies.clj:160)
    at caribou.db$wrap_db$fn__100$fn__101.invoke(db.clj:230)
    at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:156)
    at caribou.db$wrap_db$fn__100.invoke(db.clj:230)
    at clojure.lang.Var.invoke(Var.java:401)
    at ring.middleware.stacktrace$wrap_stacktrace_log$fn__613.invoke(stacktrace.clj:15)
    at ring.middleware.stacktrace$wrap_stacktrace_web$fn__644.invoke(stacktrace.clj:79)
    at ring.middleware.reload$wrap_reload$fn__785.invoke(reload.clj:18)
    at ring.adapter.jetty$proxy_handler$fn__88.invoke(jetty.clj:18)
    at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown Source)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:349)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
    at java.lang.Thread.run(Thread.java:680)
b-outlaw commented 12 years ago

Moving to caribou-admin.