Problems getting the DB column references to validate.

I am using 9.0.4 build.
I am unable to get my code to verify against the data source set up for the columns. All column references are showing they cant resolve on items like.@JoinColumn(name="EQUIPMENT_ID")

I have deleted and added the data source several times.
I have invalidated the Cache, restarted IDE.
I have restarted system.
I have wasted 3 days on this.

Can someone please tell me how to correct this crap I hate having false errors showing in the IDE.

Thank you all.

4 comments
Comment actions Permalink

Wow, you seem to have little else to do, if you can spend three days on such a minor issue.
Maybe you should have tried for an hour or so, then posted a friendly question in the forum...

Please specify which IDEA version you use, then try to describe your current set up
Hibernate? JPA? DB? How many modules? Which dependencies between module? Which facets are configured?

IMHO the most likely setting to check is whether you have assigned the data source correctly to your JPA or Hibernate facet.

On 20.11.2010 20:26, Elija Marshall wrote:

I am using 9.0.4 build.
I am unable to get my code to verify against the data source set up for the columns. All column references are showing they cant resolve on items like.@JoinColumn(name="EQUIPMENT_ID")

>

I have deleted and added the data source several times.
I have invalidated the Cache, restarted IDE.
I have restarted system.
I have wasted 3 days on this.

>

Can someone please tell me how to correct this crap I hate having false errors showing in the IDE.

>

Thank you all.

>

---
Original message URL: http://devnet.jetbrains.net/message/5278135#5278135


0
Comment actions Permalink

So cool that you responded on a weekend. Thank you!

[ Wow, you seem to have little else to do, if you can spend three days on such a minor issue.
Maybe you should have tried for an hour or so, then posted a friendly question in the forum...]
Okay so over 3 days a whole lot of wasted hours.
As pathetic as it sounds, where I am working during m-f I have NO internet access so there is no way for me to get any type of external help.


[Please specify which IDEA version you use, then try to describe your current set up
Hibernate? JPA? DB? How many modules? Which dependencies between module? Which facets are configured?]

I am using the latest 9.0.4.

Rather hard for me to explain the above as I really am not sure. I have no background with Hibernate other than the past week. Was given the project source code. Also, I am not sure about your reference to dependencies between modules and facets. These are new terms to me with IntelliJ.


However in setting up the project this is what I had done.

Created a new project from existing source.

Using Oracle 10g Express on my laptop (Vista 64 ouch). Imported database vis sqlplus.

I used the Data Source window to create the connection.

JDBC DRIVER:

oracle.jdbc.OracleDriver

DATABASE URL:

jdbc:oracle:thin:@localhost:1521:XE

USER NAME:

****

PASSWORD:

****

Testing Connection passes. I have the data source listed in the Data Source window. I refreshed the tables and I can see all of the schema.



IMHO the most likely setting to check is whether you have assigned the data source correctly to your JPA or Hibernate facet
I do not know if I did this correctly or not. I could not find instructions to follow.

0
Comment actions Permalink

The JPA/Hibernate facets configured for your modules have a configuration screen that allows you to "pair" them to a Datasource you have configured.
The datasource contains (cached) information on table/column structures, allowing IDEA to validate any table/column references (like in JPA annotations).

The is a bundled help/documentation that contains some example screens.

0
Comment actions Permalink

Thank you for the tip. I found what you were talking about under the Project Structure.

1st column display I selected Facets
2nd column display I selected Hibernate -- > Hibernate (DataSourceName)
3rd larger column display on the bottom panel is the DataSources Mapping area.
   Here I had a Session Factory set but it did not have anything set in the Data Source.
   Once I set it to the Data Source that I had created the other day :) It worked!

Thank you two for your help with this matter. Huge relief.

0

Please sign in to leave a comment.