title: Scala import not working - object <name> is not a member of package, sbt preppends current package namespace in imports
body: <p>I have an issue when trying to import in scala. The object <code>Database</code> exists under <code>com.me.project.database</code> but when I try to import it:</p>
  
  <pre><code>import com.me.project.database.Database
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>object Database is not a member of package com.me.project.controllers.com.me.project.database
  </code></pre>
  
  <p>Any ideas what the problem is?</p>
  
  <p><strong>Edit</strong>:</p>
  
  <p>It is worth mentioning that the import is in the file Application.scala under the package <code>com.me.project.controllers</code>, I can't figure out why it would append the import to the current package though, weird...</p>
  
  <p><strong>Edit 2</strong>:</p>
  
  <p>So using:</p>
  
  <pre><code>import _root_.com.me.project.database.Database
  </code></pre>
  
  <p>Does work as mentioned below. But should it work without the <code>_root_</code>? The comments so far seem to indicate that it should.</p>
  
  <p><strong>Answer</strong>:</p>
  
  <p>So it turns out that I just needed to clean the project for the import to work properly, using both:</p>
  
  <pre><code>import _root_.com.me.project.database.Database
  
  import com.me.project.database.Database
  </code></pre>
  
  <p>are valid solutions. Eclipse had just gotten confused.</p>