Skip to content

replaceClassName behaviour #21

@dabloem

Description

@dabloem

Hi,

I just tried to do a native 'select * from JPAUserMessage'.
I got an error. It looks like SimpleDBQuery.replaceClassName() isn't doing well.

I mimic line 67 with the above query:
String persistenceUnitName = "PU";
String className = ""; !!
String test = "select count() from PU-JPAUserMessage".replaceFirst(className, ""+persistenceUnitName+"-JPAUserMessage");
this results in "'PU-JPAUserMessage' select count(
) from 'PU-JPAUserMessage'"
so, when the className resolves to "" by matcher.find (which it does for the above query), the select expression isn't correct anymore.

Regards,
Duncan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions