Search code examples
javahtmloracleintellij-ideasynonym

Why intelliJ creates table for synonyms in other schema?


I have a problem. when I want to update my tables in oracle database via intelliJ its creates tables that are in my domain folder. its ok but its creates synonyms that defined in domain folder. when I retry to delete the tables that created for synonym its ran to error because of foreign keys. what can I do?

I use following codes in config file :

jdbc.driverClassName1=oracle.jdbc.driver.OracleDriver
jdbc.url1=jdbc:oracle:thin:@simple:simple
jdbc.username1=username1
jdbc.password1=password1
init-db=false

jdbc.driverClassName2=oracle.jdbc.driver.OracleDriver
jdbc.url2=jdbc:jdbc:oracle:thin:@simlpe:simple
jdbc.username2=username2
jdbc.password2=password2
################### Hibernate Configuration ##########################
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.hbm2ddl.auto=update
hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.acquire_increment=1
hibernate.c3p0.idle_test_period=300
hibernate.c3p0.timeout=999999
hibernate.synonyms=true
hibernate.c3p0.max_size=5
hibernate.c3p0.min_size=2
hibernate.c3p0.max_statements=0
hibernate.c3p0.preferredTestQuery=select 1
hibernate.c3p0.testConnectionOnCheckout=true
hibernate.connection.autocommit=true
hibernate.connection.useUnicode=true
hibernate.connection.characterEncoding=UTF-8
default.keyDS=TRAIN
log.server.url=/BAS/eventLog/

Solution

  • I found solution. This error happened because synonyms that we define are not mapped to actual class.