6.0 java business logic API jar file breaks code

okay. made the change and it’s working.

To be clear, this appears to mean that weborb mapping doesn’t work at all and i have to make all properties, and all getters and setters in all classes match the database columns for spelling and casement exactly. Is that correct?

If this behavior is accidental, and you are working on a fix, do you have an eta? I ask because I want to plan my application release accordingly.

If this behavior is purposeful, I will go ahead and refactor all my server code immediately and move through testing and on to other tasks.

I mostly don’t want to change code temporarily and then change it back to use weborb mapping.

Thanks,

Mark

Yes, it is a problem, I confirmed it here. I do not have an eta yet, but an engineer has already been assigned to the issue and is making progress.

Just to confirm, does the problem happen in both debug and production modes of business logic?

Regards,
Mark

i have been avoiding publishing the changes to production, so I can’t confirm. I was going to rip/replace weborb and get it through testing and into production quickly if that matches with your fix estimate.

I’ll keep an eye on this thread and decide how long to wait.

I appreciate the help.

Mark

Hi @Mark_Moline !

Could you please create project with code to reproduce this problem using “bin” and “libs” directories from actual project in which problem occurs?
After doing so pack it to arhive and send it here.
We believe that problem can be caused by binaries version mismatch and such “test” project will help us.

Regards, Andriy

Hi @Mark_Moline!

If you want to have property names different from DB column names you should use MapToProperty annotation on getter/setter and make fields private. If fields in your data model class is public then you can use this annotation directly on your fields.
We will update our documetation to describe this moment. Sorry for inconvenience.

Regards, Andriy

Hi @Mark_Moline,

To clarify what @Andriy_Konoz wrote, I’d like to share some background information. What happened prior to the 6.0 release the @MapToProperty annotation wasn’t used because it is applied to private fields. What made it work is the backend ignored the capitalization of the column names. That is if you created a column in console named mobiledeviceid and in your Java code the property was named MobileDeviceId, the SDK would serialize the property exactly as it is written, and the backend would still locate the right column because it ignored the upper case. With the 6.0 release, the check was made to be stricter which showcased the problem you’re experiencing. There are three approaches to fixing it:

  1. Do not use the annotation and change the property names to match what they are in the database schema
  2. Make the fields public and use the annotation with the fields.
  3. Apply the @MapToProperty annotation to the getXXX() methods.

Please let me know if you have any questions.

Regards,
Mark

Okay. thank you for the information. I had been pulled onto something else for the last few days. For the time being, I’ve used option 1.

I appreciate this!

Hello @Mark_Moline

We’ve released the new version of Backendless.
Please, could you confirm that this issue doesn’t appear?

Regards,
Inna