Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
ServiceBuilder getModelAttributes issue after migrating to 7.2.1 DXP
Hello, I have an issue with Liferay's ServiceBuilder. We have a custom implementation of "getModelAttributes" and "setModelAttributes" methods in our model implementation (model.impl.XXXImpl). Basically we call super method (base implementation) and just add a little thing from us.It worked well in 7.0.6, we've successfully overridden the basic method and it worked. Now I'm migrating that module to 7.2.1 DXP version and after running the buildService it duplicates the method in RiskProfileWrapper class. So for example in 7.0.6 after running ServiceBuilder in XXXWrapper we only had base implementation and in 7.2.1 DXP after running service builder we have both - base implementation and another method like this:
How can I override that method?
Best regards
@EDIT - I know I could just rename my method and use the new one instead of the "getModelAttributes" but I don't feel like it's the right thing to do in that case. We want to override so it works fine if anyone uses that and not our "new" method
@OverrideAnd it causes duplicated method error
public Map<String, Object> getModelAttributes() {
return model.getModelAttributes();
}
How can I override that method?
Best regards
@EDIT - I know I could just rename my method and use the new one instead of the "getModelAttributes" but I don't feel like it's the right thing to do in that case. We want to override so it works fine if anyone uses that and not our "new" method
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™