Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting the db var for clj-record library in a common file

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use the clj-record library, and I don't want to set the db variable in all my entity files. How can I put it in a common file and use it ? (I still don't get the concept of namespace well...)

Here is what I have :
chapter09/model/user.clj

I want to extract the db variable.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it. That was simple...

chapter09/config/db.clj


chapter09/model/user.clj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic