Skip to content
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

replaceClassName behaviour #21

Open
dabloem opened this issue Jan 20, 2012 · 0 comments
Open

replaceClassName behaviour #21

dabloem opened this issue Jan 20, 2012 · 0 comments

Comments

@dabloem
Copy link

dabloem commented Jan 20, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant