0
Fixed

​​reverse engineering fails if any function-based index exists

Ilya Kharlamov 4 years ago updated by Michał Kołodziejski 4 years ago 2

Dzień dobry

  1. get reverse-engineering-1_6_9.jar
  2. oracle 11.2.0.4.0
  3. create a table that uses fbi (a function based index)


create table

AAA

(

x number

);

create index aaa_idx1 on AAA(upper(x));


4. call the reverse-engineering-tool

Exception in thread "main" com.vertabelo.reverse.nr: Column SYS_NC00002$ not found in AAA

at com.vertabelo.reverse.ns.a(:1413)
at com.vertabelo.reverse.ns.a(:1392)
at com.vertabelo.reverse.ny.a(:317)
at com.vertabelo.reverse.ns.b(:550)
at com.vertabelo.reverse.ns.c(:412)
at com.vertabelo.reverse.ns.b(:185)
at com.vertabelo.reverse.Main.main(:491)


Solution:

You use in your code


paramDatabaseMetaData.getString("COLUMN_NAME");


but you'll need to check if this column really exists via DatabaseMetaData.getColumns before doing that



Answer

Answer
Fixed

Unfortunately, Vertabelo doesn't support this construction now - indexes may have only columns from the table. We have this feature on our roadmap, but it's not available yet.


I've fixed the problem in the reverse-engineering tool so that such indexes were ignored and listed at the end of the reverse-engineering operation. Here is a link to the JAR with this issue fixed: reverse-engineering-1_6_10.jar
Please, check if it works well now.


Regarding indexes with expressions, I'd suggest placing them manually in the "Additional SQL scripts" section in table properties. This way, they'll be present in the output SQL script.


I look forward to your feedback.

Answer
Fixed

Unfortunately, Vertabelo doesn't support this construction now - indexes may have only columns from the table. We have this feature on our roadmap, but it's not available yet.


I've fixed the problem in the reverse-engineering tool so that such indexes were ignored and listed at the end of the reverse-engineering operation. Here is a link to the JAR with this issue fixed: reverse-engineering-1_6_10.jar
Please, check if it works well now.


Regarding indexes with expressions, I'd suggest placing them manually in the "Additional SQL scripts" section in table properties. This way, they'll be present in the output SQL script.


I look forward to your feedback.