Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
When I create my second core data model and run the application everything is fine. But when I modify the second model, application is crashed, and I have to delete my app and run again. Is it normal? When I put my application's second version into the AppStore will it be OK or not?
This is expected behavior. You have altered your Core Data Model, and when you attempt to run the new model over the existing one in your previous build, it can't figure out how to migrate the old store to a new store with the new model; this is called a migration. A lightweight migration (meaning you don't have to write any custom migration logic) can be performed as long as you version your model for every set of model changes. When changes are made within a version and you install over a previous build, the migration fails and your app crashes.
For working in the simulator, it's normal to reset content and settings very often when messing with your core data model, but when shipping to the store, it's very important to be aware of model versions. Once you ship with Model Version 1, no more edits can be made to that model version. As soon as you ship with model 1, go ahead and create a new model that you can edit freely until your next ship date. Do this by selecting your xcdatamodelId file, and selecting Editor -> Add Model Version. The "based on model" is your current model. Once this is created, select your xcdatamodelId file again and in the file inspector, make sure you new model version is selected under the heading Model Version.
Doing this will allow you to use lightweight migrations and stop your crashes, and you data will migrate from your old store to the new one on installing an update. Read here in the docs for more!
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 months ago.
Improve this question
Thank you for checking my code
No matter what I do, the record is not saved, it does not give any error
I copied the database file from another project to the root of my project
I have a function called fill, which then saves the information from the select database, the moment I save it, it displays the new record in the datagrid, but when I open the program again, it does not show the record, and when I check the table itself, nothing is saved.
This is my code :
Dim con1 As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|anbar.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")
con1.Open()
Dim com As New SqlCommand("INSERT INTO tblcustomer(name)Values(#name)", con1)
com.Parameters.AddWithValue("name", txtName.Text)
com.CommandType = CommandType.Text
com.ExecuteNonQuery()
con1.Close()
Thank you for your advice.
The question in the comments is relevant: what value is returned ExecuteNonQuery? I'm confident that the answer is going to be 1, which means that everything is working exactly as it's supposed to and you just don't know how local data files work.
When you add a data file to your project - MDF, MDB, ACCDDB or the like - it becomes a source file, i.e. part of the project. When you build your project, the compiled EXE is saved to the output folder and the data file is copied there too. It is that copy that your app connects to at run time.
By default, the source file is copied to the output folder EVERY TIME you build your project. That means that if you run the project, make changes to the database, stop the project, make a code change and then run the project again, your database changes will be overwritten, like you never made them.
It's important that you have these two copies of the database because you don't want to have to clean all your test data out when it comes time to release the application. You want to just build and get a clean database, which is exactly what happens.
The solution to your "problem" is to select the data file in the Solution Explorer, open the Properties window and change the Copy to Output Directory property to Copy if Newer. That way, the working data file in the output folder will only be overwritten if you have made changes to the source file. That way, changes you make to the database will persist until you change the source data, delete the working data file or change that property again.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I've got one java web based project. Build using JDK 1.8 and Using Intellij as IDE.
Using tomcat to deploy the product
Essentially in our product I was trying to test a few things with a class.
Very recently what has happened is whenever I am compiling and putting it inside our project it is saying page not found.
So, I reverted my code base to Out of the box state, compiled and put it back. Still it
s giving me page not found error.
One annoying this about this error is, In the logs I don't have a single error.
So it's not even hinting on where to look or what's going on.
Second annoying this was, like I did some series of changes , but for every change I took a back up. Think of it like, if default OTB was Revision 1, My changes are in Revision 2,3,4. From revision 4 I started to get this error. But when I take revision 1 and put it back. Still getting page not found. But if I take Revision 2 or 3. It is working.
I've compared all revisions and code wise there's no such change, which could break anything. I've a strong doubt that it could be one of the project structure settings.
I checked local history, but apparently local history refreshes every time you rebuild a project so no luck there.
I want to understand and resolve this problem.
Any tips on how to handle this, will help greatly.
Thanks
So, the answer to this problem was Embarrassingly simple.
Our project was last certified with OpenJDK11 but I mixed two of my tasks and started using openJDK12.
I don't understand what exactly in OpenJDK12 broke this.
And I want to inspect what went wrong.
But for the current task at hand. 1 solution is as simple as reverting back to OpenJDK11. After that when I used this modified class it was working perfectly.
PS: Still not 100% sure if it was due to jdk version. But If it was I wonder why in logs it was not mentioning that error. Which says compiled using higher version of Java.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to upgrade my Odoo module V12 to V13 Please guide me how can I do that. And can I upgrade just single module in ODOO 12? Please guide me step by step.
You can try Tasks to do in the migration listed above.
Bump module version to 13.0.1.0.0.
Remove any possible migration script from previous version.
Squash administrative commits (if any) with the previous commit for reducing commit noise. They are named as "[UPD] README.rst", "[UPD] Update $MODULE.pot", "Update translation files" and similar names, and comes from OCA-git-bot, oca-travis or oca-transbot.
Remove all the decorators #api.multi, #api.returns, #api.one, #api.cr, #api.model_cr from the code. Now they are all multi-record by default. In case of the last ones, you will need to adapt the code to the behavior change.
Check that all "compute" methods of non-stored computed fields assign a value in any case to the field, even if it is a falsy one. (https://github.com/odoo/odoo/pull/36743/commits/2e43bfc1c4b2f61e0459614f61f90a77dc3b7233).
Computed stored fields will keep their previous value if not assigned during the compute method, so don't rely on any expected default value.
Replace sudo(user): "deprecated use of sudo(user), use with_user(user) instead"
Some of the Font Awesome (FA) icons have changed their name as now Odoo uses FA v5, so you might need to change them in your module views. Check the changed names in https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes.
Remove all the oldname field attributes in the code. If they were added in previous version, they have served their function any way, and now in this version it's not supported, so if you have the need, create a migration script and use openupgradelib's rename_fields method.
Remove view_type tag on action window XML definition. It's now always form (tree is not supported since 11.0 any way).
Remove multi field from ir.actions.act_window models. Now you have binding_view_types field for indicating in which view the action will be available: list, form or empty for both. If declaring the action through the accelerator tag <act_window>, then use the attribute binding_views. More reference in https://github.com/odoo/odoo/pull/24738/commits/33d51480688065e367eb646f12b89d721749cac9.
If having an smart-button for active field, with widget toggle_button, the archive/unarchive actions are available without doing anything more, so you can remove it. And the new paradigm is to put instead a ribbon when archived with the code <widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>.
If using any decimal precision in float fields (example: import odoo.addons.decimal_precision as dp; x = fields.Float(digits=dp.get_precision("Account"))), now the qualifier is put directly without the need of importing anything and simplifying syntax: x = fields.Float(digits="Account").
In the manifest, rename python dependencies to use the PyPI distribution name instead of the import name (see https://github.com/odoo/odoo/pull/25549 for more information)
If the module is touching Accounting part, see https://github.com/OCA/maintainer-tools/issues/430 for the structural changes detected in it.
Add tests to increase code coverage.
Check tasks of previous versions if you are migrating from lower versions than v12. It's also recommended to check for things not done in previous migrations.
Do the rest of the changes you need to do for making the module works on new version.
Regex which can help to find the things to remove/change:
grep -nri 'oldname\|sudo([^\)]\+)\|api.multi\|api.returns\|api.one\|api.cr\|api.model_cr\|12.0\|compute=' $MODULE
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've developed a console application that does a lot of routines, but the Antivirus detected it as a malware of type Gen:Variant.Ursu.56053.
How can I fix this without touching the antivirus policy because it's not allowed for us to create any exceptions for any found threat.
I'd like also to mention that If i changed the assembly name the antivirus is no longer consider the new file virus, but it looks that it considers it virus because I invoke it many times, with different parameters.
Any suggestions, I'm really suffering from this,
I know this thread is very old, but for people which will come here - to fix this issue simply add icon to the program, im not even joking, it works.
FALSE +VE ALERT!!! Many antivirus engines have name pattern matching as their Swiss-knife to detect malicious files,If any of them matches the name they have in their Database then you can't do much about it. Its simply became a False +ve !!! Also your assembly name should consist of the technology area and component description, or company name and technology area (depending on your preferance). So try changing it to more specific one. :)
Assuming that you are talking about .NET (with relation to Visual Studio) For Ex:
Project: Biometric Device Access
Assembly: BiometricFramework.DeviceAccess.dll
Namespace: ACME.BiometricFramework.DeviceAccess
I had the same problem with Bitdefender, but mine is a Gen:Variant.Ursu.787553 when I tried creating a .exe file from my C program.
I simply moved it out of quarantine manually, and it worked well. You might have to that every time you build a new program. Hope this helps!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Yesterday I had a huge problem - suddenly my cocos2d project stopped compiling. You can read the story here: My cocos2d project stopped compiling! Over 40 errors! What to do?
Apparently something changed the folder name and it was the reason. I have made a new project, copied my files into it, verified that everything worked, made a snapshot and zip backup and went to sleep. Now when I did a small change to code and compiled it for simulator it worked.
But when I tried to compile it for device I got same 40 errors.
This is really killing me.
I use ARC-enabled cocos2d project.
If you want to check it out yourself here is the project - https://www.dropbox.com/s/eic1llpri6x6akt/BusterballBackupV1.0.zip
Restoring snapshot or from zip file didnt help either.
I think the problem might be with that:
When you look on the pane to the left of Xcode where you see your project layout there is a folder named Products. It contains two items in it - app itself and libcocos2d-library.a.
When I checked out fresh template they are black and have some strange path in the depth of xcode. But after I add files they go red and lose paths. What can be done about that? I cannot find that file (libcocos2d-library.a)
The problem is caused by the configuration of the static library target. The option "Always Search User Paths" should be set to NO. Here are the steps:
Choose the target cocos2d-library
In the right side, choose the Build Settings,
Find Always Search User Paths and set it to be NO
Build the project. It should be OK. The xCode version I used is Version 4.4 (4F250)