Hi Joerg,

sorry for delayed reply. Your analysis seems valid. Yes, please open a Jira 
with your patch. CAY-1226 is probably a different limitation. 

Thanks,
Andrus


On Jan 9, 2012, at 10:38 AM, Schönfisch, Jörg wrote:
> Any feedback on this?
> 
> Regards
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Schönfisch, Jörg [mailto:[email protected]] 
> Gesendet: Freitag, 23. Dezember 2011 09:50
> An: [email protected]
> Betreff: AW: ThrowOnPartialOrCreateSchemaStrategy, DbEntities with schema, 
> and missing tables
> 
> CAY-1226 might also be related to this.
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Schönfisch, Jörg [mailto:[email protected]] 
> Gesendet: Freitag, 23. Dezember 2011 09:46
> An: [email protected]
> Betreff: ThrowOnPartialOrCreateSchemaStrategy, DbEntities with schema, and 
> missing tables
> 
> Hi everybody,
> 
> I'm using a ThrowOnPartialOrCreateSchemaStrategy and I ran into the problem 
> that my tables are not generated if I specify a schema for the DbEntities. 
> SchemaAnalyzer.compareTables only checks if the schema exists and doesn't 
> verify if it actually contains any tables. I'm using the latest trunk (rev 
> 1222604) and Postgres 8.3. The following patch fixes the problem for me. 
> Should I raise an issue in JIRA for this?
> 
> Cheers,
> Joerg
> 
> 
> 
> Index: SchemaAnalyzer.java
> ===================================================================
> --- SchemaAnalyzer.java       (revision 1222604)
> +++ SchemaAnalyzer.java       (working copy)
> @@ -119,7 +119,12 @@
> 
>             if (schema != null) {
>                 if (schemaNameMap.get(schema) != null) {
> -
> +                    Collection<String> names = schemaNameMap.get(schema);
> +                    if (names.contains(name)) {
> +                        mapTableInDB.put(name, schema);
> +                    } else {
> +                        tableNoInDB.add(name);
> +                    }
>                 }
>                 else {
>                     isIncluded = false;
> 

Reply via email to