New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle issues #337

Closed
paplorinc opened this Issue Feb 1, 2013 · 13 comments

Comments

Projects
None yet
3 participants
@paplorinc

Hi,

Thanks for this library, I have been playing with it but found a few things I would like to report;

Using the following config:

<configuration>
    <packageName>${project.groupId}</packageName>
    <targetFolder>${generatedSourcesDirectory}</targetFolder>

    <jdbcDriver>oracle.jdbc.driver.OracleDriver</jdbcDriver>
    <jdbcUrl>jdbc:oracle:thin:@//localhost:1521/ORACLE</jdbcUrl>
    <jdbcUser>X</jdbcUser>
    <jdbcPassword>Y</jdbcPassword>
</configuration >

with oracle 11.2 querydsl generates 27 mb of garbage. It exports for some mysterious reason the whole classpath as tables, for example the whole JDK (with xml export and stuff). Very weird. It's an easy fix though, I have to set <schemaPattern>X</schemaPattern> to the same value as the jdbcUser for it to work.

The other issue is that it exports the views from the database also, which I don't need. The bigger problem is that the export is wrong, as the view's column names may contain illegal characters, for example #, which creates variable names like public final StringPath cp#cpcg#desShortname which is obviously wrong.

It might work somewhat better with a toCamelCase like the following:

private static final Pattern INVALID_VARIABLE_START_PATTERN = Pattern.compile("^[^\\p{javaLetter}]+");
private static final Pattern VALID_JAVA_CAMEL_CASE_VARIABLE_PATTERN = Pattern.compile("^\\p{javaLowerCase}\\p{L}*");
private static final Pattern VALID_VARIABLE_CHARACTERS = Pattern.compile("\\p{L}+");

public static String toCamelCaseSymbol(String str)
{
    String result = INVALID_VARIABLE_START_PATTERN.matcher(str).replaceFirst("");
    if (Character.isUpperCase(result.charAt(0)))
    {
        result = Character.toLowerCase(result.charAt(0)) + result.substring(Math.min(1, result.length()));
    }

    if (!VALID_JAVA_CAMEL_CASE_VARIABLE_PATTERN.matcher(result).matches())
    {
        final StringBuilder builder = new StringBuilder(result.length());
        int pos = 0;
        final Matcher matcher = VALID_VARIABLE_CHARACTERS.matcher(result);
        if (matcher.find(pos))
        {
            builder.append(result.substring(matcher.start(), matcher.end()).toLowerCase());
            pos = matcher.end();

            while (matcher.find(pos))
            {
                builder.append(Character.toUpperCase(result.charAt(matcher.start())))
                       .append(result.substring(matcher.start() + 1, matcher.end()).toLowerCase());
                pos = matcher.end();
            }
        }
        result = builder.toString();
    }

    return SourceVersion.isKeyword(result) ? result + "_" : result;
}

I have tested it with:

System.out.println(toCamelCaseSymbol("123HELLO_THIS_IS_ME"));
System.out.println(toCamelCaseSymbol("HElLO_THIS_IS_ME"));
System.out.println(toCamelCaseSymbol("HELLO_THIS_IS_ME"));
System.out.println(toCamelCaseSymbol("camelCaseIsAwesome"));
System.out.println(toCamelCaseSymbol("CamelCaseIsAwesome"));
System.out.println(toCamelCaseSymbol("CamelCaseI#sAwesome"));
System.out.println(toCamelCaseSymbol("c"));
System.out.println(toCamelCaseSymbol("cx"));
System.out.println(toCamelCaseSymbol("1c"));
System.out.println(toCamelCaseSymbol("C"));
System.out.println(toCamelCaseSymbol("CC"));
System.out.println(toCamelCaseSymbol("Cc"));
System.out.println(toCamelCaseSymbol("2C"));
System.out.println(toCamelCaseSymbol(""));

And it seems to work fine;

ps. you might want to change the default generation directory to

<generatedSourcesDirectory>${project.build.directory}/generated-sources/java</generatedSourcesDirectory>

, it's more compact
ps2. it might also be good to add the default phase to the execution so that people will know how to change it, like

<phase>generate-sources</phase>
<goals>
     <goal>export</goal>
 </goals>

and putting a config inside the execution also so that people can add multiple databases.

The whole config, with extracted properties, multiple executions, optional profile activation and deactivation, proper dependency declaration, and marking the generated sources as sources directory looks like this:

<properties>
    <generatedSourcesDirectory>${project.build.directory}/generated-sources/java</generatedSourcesDirectory>

    <querydsl.version>2.9.0</querydsl.version>
    <slf4j-log4j12.version>1.6.4</slf4j-log4j12.version>
    <ojdbc6.version>11.2.0.3</ojdbc6.version>

    <DB1>db1<DB1>
    <DB2>db2<DB2>
</properties>

<profiles>
<profile>
<id>regenerate_database_bridge</id>
<build>
<plugins>
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.7</version>
    <executions>
        <execution>
            <configuration>
                <sources>
                    <source>${generatedSourcesDirectory}</source>
                </sources>
            </configuration>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
        </execution>
    </executions>
</plugin>

<plugin>
    <groupId>com.mysema.querydsl</groupId>
    <artifactId>querydsl-maven-plugin</artifactId>
    <version>${querydsl.version}</version>
    <configuration>
        <packageName>${project.groupId}</packageName>
        <targetFolder>${generatedSourcesDirectory}</targetFolder>

        <jdbcDriver>oracle.jdbc.driver.OracleDriver</jdbcDriver>
        <jdbcUrl>jdbc:oracle:thin:@//localhost:1521/ORACLE</jdbcUrl>
    </configuration>
    <executions>
        <execution>
            <id>${DB1}</id>
            <configuration>
                <namePrefix>${DB1}</namePrefix>
                <packageName>${project.groupId}.${DB2}</packageName>

                <schemaPattern>${DB1}</schemaPattern>
                <jdbcUser>${DB1}</jdbcUser>
                <jdbcPassword>db1password</jdbcPassword>
            </configuration>
            <phase>generate-sources</phase>
            <goals>
                <goal>export</goal>
            </goals>
        </execution>
        <execution>
            <id>${DB2}</id>
            <configuration>
                <namePrefix>${DB2}</namePrefix>
                <packageName>${project.groupId}.${DB2}</packageName>

                <schemaPattern>${DB2}</schemaPattern>
                <jdbcUser>${DB2}</jdbcUser>
                <jdbcPassword>db2password</jdbcPassword>
            </configuration>
            <phase>generate-sources</phase>
            <goals>
                <goal>export</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>oracle.jdbc.driver</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>${ojdbc6.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j-log4j12.version}</version>
        </dependency>
    </dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-sql</artifactId>
        <version>${querydsl.version}</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j-log4j12.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>oracle.jdbc.driver</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>${ojdbc6.version}</version>
    </dependency>
</dependencies>

ps3. would it be possible to query the database table names as a string more easily?
I would prefer something like: UAUserRole.autUserId.toString() or UAUserRole.autUserId.name() (instead of UAUserRole.userRole.autUserId.toString().
I would personally also prefer the static variable to be named INSTANCE or something constant, if we cannot eliminate it (which might be possible with enums instead of classes, but it might not be worth it.))

Thanks, and I hope it helps,
Pap Lőrinc

timowest added a commit that referenced this issue Feb 1, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 1, 2013

Member

with oracle 11.2 querydsl generates 27 mb of garbage. It exports for some mysterious reason the whole classpath as tables, for example the whole JDK (with xml export and stuff). Very weird. It's an easy fix though, I have to set X to the same value as the jdbcUser for it to work.

What is the schema of the garbage content? That could maybe be used to filter garbage out, if no schema pattern is given.

The other issue is that it exports the views from the database also, which I don't need.

Could you create a new ticket for that

The bigger problem is that the export is wrong, as the view's column names may contain illegal characters, for example #, which creates variable names like public final StringPath cp#cpcg#desShortname which is obviously wrong.

This has been fixed now 959dc10

ps. you might want to change the default generation directory to

But it's in a superclass which is used for both main and test side code generation.

ps2. it might also be good to add the default phase to the execution so that people will know how to change it, like

Why? It's already in the goal definition.

ps3. would it be possible to query the database table names as a string more easily?
I would prefer something like: UAUserRole.autUserId.toString() or UAUserRole.autUserId.name() (instead of UAUserRole.userRole.autUserId.toString().

That's difficult, because Querydsl has a dynamic metamodel, so the metadata is accessible via the Q-type instances.

I would personally also prefer the static variable to be named INSTANCE or something constant, if we cannot eliminate it (which might be possible with enums instead of classes, but it might not be worth it.))

I believe the uncapitalized version of the type name is more intuitive. Do you refer to the default variable by reflection or why do you need something constant?

Member

timowest commented Feb 1, 2013

with oracle 11.2 querydsl generates 27 mb of garbage. It exports for some mysterious reason the whole classpath as tables, for example the whole JDK (with xml export and stuff). Very weird. It's an easy fix though, I have to set X to the same value as the jdbcUser for it to work.

What is the schema of the garbage content? That could maybe be used to filter garbage out, if no schema pattern is given.

The other issue is that it exports the views from the database also, which I don't need.

Could you create a new ticket for that

The bigger problem is that the export is wrong, as the view's column names may contain illegal characters, for example #, which creates variable names like public final StringPath cp#cpcg#desShortname which is obviously wrong.

This has been fixed now 959dc10

ps. you might want to change the default generation directory to

But it's in a superclass which is used for both main and test side code generation.

ps2. it might also be good to add the default phase to the execution so that people will know how to change it, like

Why? It's already in the goal definition.

ps3. would it be possible to query the database table names as a string more easily?
I would prefer something like: UAUserRole.autUserId.toString() or UAUserRole.autUserId.name() (instead of UAUserRole.userRole.autUserId.toString().

That's difficult, because Querydsl has a dynamic metamodel, so the metadata is accessible via the Q-type instances.

I would personally also prefer the static variable to be named INSTANCE or something constant, if we cannot eliminate it (which might be possible with enums instead of classes, but it might not be worth it.))

I believe the uncapitalized version of the type name is more intuitive. Do you refer to the default variable by reflection or why do you need something constant?

@paplorinc

This comment has been minimized.

Show comment
Hide comment
@paplorinc

paplorinc Feb 4, 2013

What is the schema of the garbage content? That could maybe be used to filter garbage out, if no schema pattern is given.

The generated 36mb has content similar to the following:

/**
 * QJava/applet/AppletContext is a Querydsl query type for QJava/applet/AppletContext
 */
@Generated("com.mysema.query.sql.codegen.MetaDataSerializer")
public class QJava/applet/AppletContext extends com.mysema.query.sql.RelationalPathBase<QJava/applet/AppletContext> {

    private static final long serialVersionUID = -741763140;

    public static final QJava/applet/AppletContext java/applet/AppletContext = new QJava/applet/AppletContext("java/applet/AppletContext");

    public QJava/applet/AppletContext(String variable) {
        super(QJava/applet/AppletContext.class, forVariable(variable), "PUBLIC", "java/applet/AppletContext");
    }

    @SuppressWarnings("all")
    public QJava/applet/AppletContext(Path<? extends QJava/applet/AppletContext> path) {
        super((Class)path.getType(), path.getMetadata(), "PUBLIC", "java/applet/AppletContext");
    }

    public QJava/applet/AppletContext(PathMetadata<?> metadata) {
        super(QJava/applet/AppletContext.class, metadata, "PUBLIC", "java/applet/AppletContext");
    }
}

or

/**
 * QXmlparser is a Querydsl query type for QXmlparser
 */
@Generated("com.mysema.query.sql.codegen.MetaDataSerializer")
public class QXmlparser extends com.mysema.query.sql.RelationalPathBase<QXmlparser> {

    private static final long serialVersionUID = -8757243;

    public static final QXmlparser xmlparser = new QXmlparser("XMLPARSER");

    public QXmlparser(String variable) {
        super(QXmlparser.class, forVariable(variable), "PUBLIC", "XMLPARSER");
    }

    @SuppressWarnings("all")
    public QXmlparser(Path<? extends QXmlparser> path) {
        super((Class)path.getType(), path.getMetadata(), "PUBLIC", "XMLPARSER");
    }

    public QXmlparser(PathMetadata<?> metadata) {
        super(QXmlparser.class, metadata, "PUBLIC", "XMLPARSER");
    }
}

Not sure though what schema you're searching for here, I haven't set any in my config;

Could you create a new ticket for that

Sure, #338

But it's in a superclass which is used for both main and test side code generation.

In Maven everything that was generated should go in the target folder, therefore ${project.basedir}/target can be replaced with ${project.build.directory}, even for tests.

ps2. it might also be good to add the default phase to the execution so that people will know how to change it, like

Why? It's already in the goal definition.

Just so that people - who are not Maven experts - know how to change the default phase.

I believe the uncapitalized version of the type name is more intuitive. Do you refer to the default variable by reflection or why do you need something constant?

I was just referring to the Singleton inside the main class. It's usually called INSTANCE, so instead of UAUserRole.userRole.autUserId.toString() you would use UAUserRole.INSTANCE.autUserId.toString().

Thanks :)

What is the schema of the garbage content? That could maybe be used to filter garbage out, if no schema pattern is given.

The generated 36mb has content similar to the following:

/**
 * QJava/applet/AppletContext is a Querydsl query type for QJava/applet/AppletContext
 */
@Generated("com.mysema.query.sql.codegen.MetaDataSerializer")
public class QJava/applet/AppletContext extends com.mysema.query.sql.RelationalPathBase<QJava/applet/AppletContext> {

    private static final long serialVersionUID = -741763140;

    public static final QJava/applet/AppletContext java/applet/AppletContext = new QJava/applet/AppletContext("java/applet/AppletContext");

    public QJava/applet/AppletContext(String variable) {
        super(QJava/applet/AppletContext.class, forVariable(variable), "PUBLIC", "java/applet/AppletContext");
    }

    @SuppressWarnings("all")
    public QJava/applet/AppletContext(Path<? extends QJava/applet/AppletContext> path) {
        super((Class)path.getType(), path.getMetadata(), "PUBLIC", "java/applet/AppletContext");
    }

    public QJava/applet/AppletContext(PathMetadata<?> metadata) {
        super(QJava/applet/AppletContext.class, metadata, "PUBLIC", "java/applet/AppletContext");
    }
}

or

/**
 * QXmlparser is a Querydsl query type for QXmlparser
 */
@Generated("com.mysema.query.sql.codegen.MetaDataSerializer")
public class QXmlparser extends com.mysema.query.sql.RelationalPathBase<QXmlparser> {

    private static final long serialVersionUID = -8757243;

    public static final QXmlparser xmlparser = new QXmlparser("XMLPARSER");

    public QXmlparser(String variable) {
        super(QXmlparser.class, forVariable(variable), "PUBLIC", "XMLPARSER");
    }

    @SuppressWarnings("all")
    public QXmlparser(Path<? extends QXmlparser> path) {
        super((Class)path.getType(), path.getMetadata(), "PUBLIC", "XMLPARSER");
    }

    public QXmlparser(PathMetadata<?> metadata) {
        super(QXmlparser.class, metadata, "PUBLIC", "XMLPARSER");
    }
}

Not sure though what schema you're searching for here, I haven't set any in my config;

Could you create a new ticket for that

Sure, #338

But it's in a superclass which is used for both main and test side code generation.

In Maven everything that was generated should go in the target folder, therefore ${project.basedir}/target can be replaced with ${project.build.directory}, even for tests.

ps2. it might also be good to add the default phase to the execution so that people will know how to change it, like

Why? It's already in the goal definition.

Just so that people - who are not Maven experts - know how to change the default phase.

I believe the uncapitalized version of the type name is more intuitive. Do you refer to the default variable by reflection or why do you need something constant?

I was just referring to the Singleton inside the main class. It's usually called INSTANCE, so instead of UAUserRole.userRole.autUserId.toString() you would use UAUserRole.INSTANCE.autUserId.toString().

Thanks :)

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 20, 2013

Member

Released in 3.0.0.BETA2

Member

timowest commented Feb 20, 2013

Released in 3.0.0.BETA2

@timowest timowest closed this Feb 20, 2013

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

org.codehaus.mojo build-helper-maven-plugin 1.5 add-source generate-sources add-source ${generatedSourcesDirectory}
                    <plugin>
                            <groupId>com.mysema.querydsl</groupId>
                            <artifactId>querydsl-maven-plugin</artifactId>
                            <version>${querydsl.version}</version>
                            <executions>
                                    <execution>
                                            <phase>generate-sources</phase>
                                            <goals>
                                                    <goal>export</goal>
                                            </goals>
                                    </execution>
                            </executions>
                            <configuration>
                                    <jdbcDriver>oracle.jdbc.driver.OracleDriver</jdbcDriver>
                                    <jdbcUrl>jdbc:oracle:thin:@XXX.XX.XX.XXXX:1521:XXXX</jdbcUrl>
                                    <jdbcUser>X</jdbcUser>
                                    <jdbcPassword>X</jdbcPassword>
                                    <tableNamePattern>XY_</tableNamePattern>
                                    <schemaPattern>X</schemaPattern>
                                    <namePrefix>M</namePrefix>
                                    <packageName>com.xyz.application.domain</packageName>
                                    <targetFolder>${generatedSourcesDirectory}</targetFolder>
                            </configuration>

                            <dependencies>
                                     <dependency>
                                        <groupId>oracle.jdbc.Oracle</groupId>
                                        <artifactId>ojdbc</artifactId>
                                        <version>${oracle.version}</version>
                                    </dependency>
                                    <dependency>
                                            <groupId>ch.qos.logback</groupId>
                                            <artifactId>logback-classic</artifactId>
                                            <version>${logback.version}</version>
                                    </dependency>
                           </dependencies>
                    </plugin>
com.mysema.querydsl querydsl-sql 3.2.4

I am trying to generate the domain classes. Oracle version 11g (11.2.0.3.7). I am executing the mvn command
mvn com.mysema.querydsl:querydsl-maven-plugin:export . But It's not generating the code. Am I doing anything wrong?

org.codehaus.mojo build-helper-maven-plugin 1.5 add-source generate-sources add-source ${generatedSourcesDirectory}
                    <plugin>
                            <groupId>com.mysema.querydsl</groupId>
                            <artifactId>querydsl-maven-plugin</artifactId>
                            <version>${querydsl.version}</version>
                            <executions>
                                    <execution>
                                            <phase>generate-sources</phase>
                                            <goals>
                                                    <goal>export</goal>
                                            </goals>
                                    </execution>
                            </executions>
                            <configuration>
                                    <jdbcDriver>oracle.jdbc.driver.OracleDriver</jdbcDriver>
                                    <jdbcUrl>jdbc:oracle:thin:@XXX.XX.XX.XXXX:1521:XXXX</jdbcUrl>
                                    <jdbcUser>X</jdbcUser>
                                    <jdbcPassword>X</jdbcPassword>
                                    <tableNamePattern>XY_</tableNamePattern>
                                    <schemaPattern>X</schemaPattern>
                                    <namePrefix>M</namePrefix>
                                    <packageName>com.xyz.application.domain</packageName>
                                    <targetFolder>${generatedSourcesDirectory}</targetFolder>
                            </configuration>

                            <dependencies>
                                     <dependency>
                                        <groupId>oracle.jdbc.Oracle</groupId>
                                        <artifactId>ojdbc</artifactId>
                                        <version>${oracle.version}</version>
                                    </dependency>
                                    <dependency>
                                            <groupId>ch.qos.logback</groupId>
                                            <artifactId>logback-classic</artifactId>
                                            <version>${logback.version}</version>
                                    </dependency>
                           </dependencies>
                    </plugin>
com.mysema.querydsl querydsl-sql 3.2.4

I am trying to generate the domain classes. Oracle version 11g (11.2.0.3.7). I am executing the mvn command
mvn com.mysema.querydsl:querydsl-maven-plugin:export . But It's not generating the code. Am I doing anything wrong?

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 3, 2013

Member

Hi.

Does it also generate nothing if you leave schemaPattern and
tableNamePattern out?

Timo

On Sun, Nov 3, 2013 at 7:03 PM, sauravGit notifications@github.com wrote:

org.codehaus.mojo
build-helper-maven-plugin
1.5

add-source
generate-sources

add-source

${generatedSourcesDirectory}

                <plugin>
                        <groupId>com.mysema.querydsl</groupId>
                        <artifactId>querydsl-maven-plugin</artifactId>
                        <version>${querydsl.version}</

version>


generate-sources

export




oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@XXX.XX.XX.XXXX:1521:XXXX
X
X
XY_
X
M
com.xyz.application.domain
${generatedSourcesDirectory}

                        <dependencies>
                                 <dependency>
                                    <groupId>oracle.jdbc.Oracle</groupId>
                                    <artifactId>ojdbc</artifactId>
                                    <version>${oracle.version}</version>
                                </dependency>
                                <dependency>
                                        <groupId>ch.qos.logback</groupId>
                                        <artifactId>logback-classic</artifactId>
                                        <version>${logback.version}</version>
                                </dependency>
                       </dependencies>
                </plugin>

com.mysema.querydsl
querydsl-sql
3.2.4

I am trying to generate the domain classes. Oracle version 11g
(11.2.0.3.7). I am executing the mvn command
mvn com.mysema.querydsl:querydsl-maven-plugin:export . But It's not
generating the code. Am I doing anything wrong?


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27648650
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

Member

timowest commented Nov 3, 2013

Hi.

Does it also generate nothing if you leave schemaPattern and
tableNamePattern out?

Timo

On Sun, Nov 3, 2013 at 7:03 PM, sauravGit notifications@github.com wrote:

org.codehaus.mojo
build-helper-maven-plugin
1.5

add-source
generate-sources

add-source

${generatedSourcesDirectory}

                <plugin>
                        <groupId>com.mysema.querydsl</groupId>
                        <artifactId>querydsl-maven-plugin</artifactId>
                        <version>${querydsl.version}</

version>


generate-sources

export




oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@XXX.XX.XX.XXXX:1521:XXXX
X
X
XY_
X
M
com.xyz.application.domain
${generatedSourcesDirectory}

                        <dependencies>
                                 <dependency>
                                    <groupId>oracle.jdbc.Oracle</groupId>
                                    <artifactId>ojdbc</artifactId>
                                    <version>${oracle.version}</version>
                                </dependency>
                                <dependency>
                                        <groupId>ch.qos.logback</groupId>
                                        <artifactId>logback-classic</artifactId>
                                        <version>${logback.version}</version>
                                </dependency>
                       </dependencies>
                </plugin>

com.mysema.querydsl
querydsl-sql
3.2.4

I am trying to generate the domain classes. Oracle version 11g
(11.2.0.3.7). I am executing the mvn command
mvn com.mysema.querydsl:querydsl-maven-plugin:export . But It's not
generating the code. Am I doing anything wrong?


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27648650
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

Yes, it's generating if I remove the schemaPattern and tableNamePattern. Are there any specific reasons for this?

Yes, it's generating if I remove the schemaPattern and tableNamePattern. Are there any specific reasons for this?

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 3, 2013

Member

On Sun, Nov 3, 2013 at 7:25 PM, sauravGit notifications@github.com wrote:

Yes, it's generating if I remove the schemaPattern and tableNamePattern.
Are there any specific reasons for this?

schemaPattern and tableNamePattern are inclusion patterns. If they are not
present, everything is included.

You probably provided values that excluded everything. Try different values.

Br,
Timo


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27649109
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

Member

timowest commented Nov 3, 2013

On Sun, Nov 3, 2013 at 7:25 PM, sauravGit notifications@github.com wrote:

Yes, it's generating if I remove the schemaPattern and tableNamePattern.
Are there any specific reasons for this?

schemaPattern and tableNamePattern are inclusion patterns. If they are not
present, everything is included.

You probably provided values that excluded everything. Try different values.

Br,
Timo


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27649109
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

I have tables like X_CONFIGURATION_1, X_CONFIGURATION_2 etc. etc. And the tableNamePattern I have used
X_. When I use this value it doesn't generate anything.

I have tables like X_CONFIGURATION_1, X_CONFIGURATION_2 etc. etc. And the tableNamePattern I have used
X_. When I use this value it doesn't generate anything.

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

The tag says it's a pattern "tableNamePattern" When I use the full table name within the tag "X_CONFIGURATION_2" it is able generate the source code for that specific table.

The tag says it's a pattern "tableNamePattern" When I use the full table name within the tag "X_CONFIGURATION_2" it is able generate the source code for that specific table.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 3, 2013

Member

Hi.

What kind of filtering do you want to apply? When you only need to restrict
your code generation to a schema then use only schemaPattern.

Timo

On Sun, Nov 3, 2013 at 8:29 PM, sauravGit notifications@github.com wrote:

The tag says it's a pattern "tableNamePattern" When I use the full table
name within the tag "X_CONFIGURATION_2" it is able generate the source code
for that specific table.


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27650560
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

Member

timowest commented Nov 3, 2013

Hi.

What kind of filtering do you want to apply? When you only need to restrict
your code generation to a schema then use only schemaPattern.

Timo

On Sun, Nov 3, 2013 at 8:29 PM, sauravGit notifications@github.com wrote:

The tag says it's a pattern "tableNamePattern" When I use the full table
name within the tag "X_CONFIGURATION_2" it is able generate the source code
for that specific table.


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/337#issuecomment-27650560
.

Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

Thank you. I have now filtered at SchemaPattern. It's working now. If I want to filter at table level on some specific given schema. Is it possible? i.e. I want to generate sourcecode for few tables on the given scehma.

Thank you. I have now filtered at SchemaPattern. It's working now. If I want to filter at table level on some specific given schema. Is it possible? i.e. I want to generate sourcecode for few tables on the given scehma.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 3, 2013

Member

It's not possible, but feel free to create a ticket for it.

Member

timowest commented Nov 3, 2013

It's not possible, but feel free to create a ticket for it.

@sauravGit

This comment has been minimized.

Show comment
Hide comment
@sauravGit

sauravGit Nov 3, 2013

Thank you. I will create a ticket for it.

Thank you. I will create a ticket for it.

@timowest timowest added this to the 3.0.0 milestone Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment