I've got an issue from client to add banners on certain pages. I found most suitable to do so using StructuredContent, specially since it would be almost as it is "Advert Banner Right Handside banner" in Demo Application.
I've examined Admn and CMS module, (see link http://docs.broadleafcommerce.org/current/CMS-Structured-Content.html) and I've added data in appropriate tables. I can tell you that I've managed to show banner on FrontEnd.
But I am facing other type of a problem

When I want to change data for that banner, I am not able to do so, since I am getting strange exception:
Code: Select all
[ERROR] 14:09:27 StructuredContentCustomPersistenceHandler - Unable to execute persistence activity
javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): org.broadleafcommerce.common.currency.domain.BroadleafCurrencyImpl
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1389)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1317)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1323)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:862)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
at com.sun.proxy.$Proxy227.merge(Unknown Source)
Again to stress this situation, when I do change values in DB directly, updates are visible on front end.
As I see from BLC framework domains, currency doesn't have sequence generator and must have prepopulated ID. At least it seems like that is the error.
In admin module, when defining banner I've noticed "Currency section". It is empty in my case.
See attached screen.
Can this be a problem? And if it is can you please direct me what I am missing?
Anyhow how the banner field is in relation with currency? I can't see it from UML diagram that is given on mentioned URL.
Thank You