Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't select existing table/collection #3

Open
kkappel opened this issue Oct 22, 2015 · 0 comments
Open

Can't select existing table/collection #3

kkappel opened this issue Oct 22, 2015 · 0 comments

Comments

@kkappel
Copy link

kkappel commented Oct 22, 2015

What does the log say?
Sorry I'm lost...

meteor create jmapp
meteor add storeness:meteor-postgres
jm = new SQL.Collection('jm');


if (Meteor.isClient) {
  Template.body.helpers({
    jms: function () {
        return jm.select().fetch();
    }
  });
}

if (Meteor.isServer) {
  jm.publish('jm', function(){
      return jm.select();
  });
}
<body>
  <div class="container">
    <header>
      <h1>Anwesenheitsliste</h1>
    </header>
    <ul>
      {{#each jms}}
      {{> jme}}
      {{/each}}
    </ul>
  </div>
</body>


<template name="jme">
  <li>{{Vorname}} {{Nachname}} Zimmer {{Zimmer}}</li>
</template>

MP_POSTGRES=postgres://foo:[email protected]:5432/jmdb meteor --port=3010

I20151022-17:31:23.710(2)? init 0
I20151022-17:31:23.796(2)? Exception from sub jm id 7W9KZDviw4iqdJ9n6 TypeError: Cannot read property 'submit' of undefined
I20151022-17:31:23.797(2)? at [object Object].Client.query (/home/kkappel/.meteor/packages/storeness_meteor-postgres/.0.2.1.9y08wy++os+web.browser+web.cordova/npm/node_modules/pg/lib/client.js:311:29)
I20151022-17:31:23.797(2)? at autoSelectHelper (packages/storeness_meteor-postgres/packages/storeness_meteor-postgres.js:645:1)
I20151022-17:31:23.797(2)? at loadAutoSelectClient (packages/storeness_meteor-postgres/packages/storeness_meteor-postgres.js:641:1)
I20151022-17:31:23.797(2)? at Array.SQL.Server.autoSelect (packages/storeness_meteor-postgres/packages/storeness_meteor-postgres.js:674:1)
I20151022-17:31:23.797(2)? at Object.publishCursor (packages/storeness_meteor-postgres/packages/storeness_meteor-postgres.js:928:1)
I20151022-17:31:23.797(2)? at [object Object].
.extend.runHandler (livedata_server.js:1059:13)
I20151022-17:31:23.798(2)? at [object Object].
.extend.startSubscription (livedata_server.js:842:9)
I20151022-17:31:23.798(2)? at [object Object].
.extend.protocol_handlers.sub (livedata_server.js:614:12)
I20151022-17:31:23.798(2)? at livedata_server.js:548:43
I20151022-17:31:29.955(2)? auto 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant