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

Refactoring model packages not updating DatabaseTableConfig #64

Open
josephmbeveridge opened this issue May 11, 2016 · 8 comments
Open

Comments

@josephmbeveridge
Copy link

Hey,

I'm in the process of refactoring our model class package hierarchy and running into issues when upgrading to this new refactored version. It appears that DatabaseTableConfig stores the expected path to a given class, to be used when deserializing from the db. However, it doesn't appear to be updated after upgrades, at least not in my case.

My specific case is moving a class from com.company.services.path.Class to com.company.sdk.services.path.Class

Is there a way to trigger a recreation of this table? Ideally I would like to avoid having to manually modify the table. I haven't been able to find any good sources on how to do this.

@kpgalligan
Copy link
Collaborator

Modify the config file or the table itself? The last paragraph is confusing. If you want to know if changing a model class can auto-update the table, no. Since you earlier focus on changing packages, I don't think you mean modifying the actual table, though.

@josephmbeveridge
Copy link
Author

It is keeping a reference to where it thinks the class should be located and when I move the class it is not being updated. How can I tell it where to look for my model class once it is moved?

@degrigorash
Copy link

@josephmbeveridge Did you resolve this issue? I have exactly the same problem.

@josephmbeveridge
Copy link
Author

No I ended up having to abandon my plans to refactor packages

@j256
Copy link
Owner

j256 commented Apr 25, 2017

Did you try regenerating the database config file? The config file certainly holds the name of the class in it but if you refactor the class you should just regenerate the config file.

@Dosssik
Copy link

Dosssik commented Apr 26, 2017

@j256 Thanks for advice!
How exactly i can regenerate this file? I try to find something like config file through project files, but there's nothing like it

UPDATE-------------------------
In our project we use default implementation of ORMLite configuration. So, obviously, there's no such file. Is there's the way to solve this issue? Or ORMLite mean "no package-level refactoring at all"? :-(

@josephmbeveridge
Copy link
Author

@j256 In my original post I asked how one would regenerate the file but I never got an answer.

@j256
Copy link
Owner

j256 commented Apr 26, 2017

Here's the documentation about how to run and regenerate the database table config file.
http://ormlite.com/docs/table-config

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

5 participants