0

I am using WOLips and Eclipse, I'm working on a project and i just need to know about some Entity that is in other project but i don't want to reference it (Build path).

I need to execute a sql statement and look if some record of this table exists, no more.

I'm trying with EOUtilities and other classes of the framework but i can't find a way to do it.

Please, excuse my english.

Any help will be apreciated.

2 Answers2

0

I imagine you could use EOUtilities.rawRowsForSQL(). You need a model name, but presumably you have that—you shouldn't need to reference the model's containing project from where you're trying to do this.

Paul A. Hoadley
  • 1,518
  • 1
  • 13
  • 17
0

You can get information about any table in the database, even if it does not appear in your model. The only reason you need the model is that one needs the connection dictionary in order to connect to the database. But you could have 0 entities in your EOModel and it will still work.

You just need to provide the SQL. For example, with MySQL, one uses "desc tables". For Oracle, one needs to use the longer command that I always have to look up that does the same thing. Then look at the resulting array of dictionaries. The table name will be tied to some key, depending on the database and version of the database and/or JDBC drives, but the table name will be there. For MySQL, the key is either "FIELD" or "NAME", I think.

Ray Kiddy
  • 3,521
  • 3
  • 25
  • 32