Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    CadenP
    @CadenP

    I've noticed that loading data with a nested copy of itself causes the nested version to not hold the requested data, even when mentioned in the view. Is there a way to force the duplicated data through?

    For example:

    Notice how one of the nested books holds title but the other, which is the same book as the parent of author, does not.

    [ // books
      {
        "id": "123",
        "_entityName": "book",
        "title": "Book #123",
        "author": {
          "id": "234",
          "_entityName": "author",
          "name": "James Person",
          "books": [
            { // note that this does not include "title"
              "id": "123",
              "_entityName": "book"
            },
            { // but this does
              "id": "456",
              "_entityName": "book",
              "title": "Book #456"
            }
          ]
        }
      }
    ]
    To clarify, this is when loading an entity or entities through the REST API.
    sanchitbhavsar
    @sanchitbhavsar
    How can I integrate external services in cuba to do database read and write ?
    Maxim Gorbunkov
    @gorbunkov
    @CadenP At the moment, there is no way to force the data duplication. We'll think and maybe we'll give this option in future releases: https://youtrack.cuba-platform.com/issue/PL-10398
    sanchitbhavsar
    @sanchitbhavsar

    Hello,

    I am invoking reindexingAll() for FTS and I got this following:

    JMX Method com.haulmont.fts.core.jmx.FtsManager : reindexAll result
    javax.persistence.PersistenceException: java.lang.RuntimeException: Error creating UUID from database value '4ea26b1ae9318743a5b61722'
        at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:484)
        at com.haulmont.cuba.core.sys.QueryImpl.getResultFromCache(QueryImpl.java:617)
        at com.haulmont.cuba.core.sys.QueryImpl.getResultList(QueryImpl.java:315)
        at com.haulmont.fts.core.sys.EntitiesCollector.loadResults(EntitiesCollector.java:98)
        at com.haulmont.fts.core.app.FtsManager.lambda$reindexEntity$2(FtsManager.java:403)
        at com.haulmont.fts.core.app.FtsManager.executeReindexInTx(FtsManager.java:523)
        at com.haulmont.fts.core.app.FtsManager.reindexEntity(FtsManager.java:397)
        at com.haulmont.fts.core.app.FtsManager.reindexAll(FtsManager.java:438)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy217.reindexAll(Unknown Source)
        at com.haulmont.fts.core.jmx.FtsManager.reindexAll(FtsManager.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
        at com.haulmont.cuba.security.sys.AuthenticationInterceptor.aroundInvoke(AuthenticationInterceptor.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
        at com.haulmont.cuba.core.sys.MBeanInterceptor.aroundInvoke(MBeanInterceptor.java:39)
        at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
        .
    CadenP
    @CadenP
    Thanks for letting me know, @gorbunkov. For the moment I'm trying to store a flat copy of the data on the client, though this is requiring me to figure out when and how to cache things so that I don't cache too little nor too much, which is requiring me to use some things I've never used before (like Redux and Redux-Saga). But, on the plus side, I'm getting some good development experience and knowledge, and this might end up being the better solution anyway, what with less requests to the server. Thanks again!
    sanchitbhavsar
    @sanchitbhavsar

    How can I integrate external services in cuba to do database read and write ?

    any thought about this?

    Aleksey Stukalov
    @aleksey-stukalov
    @sanchitbhavsar Could you elaborate please? Is generic REST not enough https://doc.cuba-platform.com/manual-6.8/rest_api_v2.html? I can preform CRUD operations over entities out of the box
    sanchitbhavsar
    @sanchitbhavsar
    @aleksey-stukalov Thanks, I will look deep into REST.
    BTW I just needed to check our external existing services by adding dependencies in cuba and to perform CRUD operations based on that services.
    so far, I have added dependencies in core module and want to run a service test case but I can find the dependencies in IDEA then , also added bean in spring.xml but still can't access the external dependencies...
    Please walk me through if I'm missing something.
    Thanks
    Aleksey Stukalov
    @aleksey-stukalov
    @sanchitbhavsar Let's go step by step. You added some maven dependencies to your project, right?
    sanchitbhavsar
    @sanchitbhavsar
    yes, in the core module and then I was trying to get that dependencies in the IDEA
    sanchitbhavsar
    @sanchitbhavsar
    BTW I got another question related FTS, How can I make it bound to user role ex: I have a user which is allowed to see only some of the screens but the fts search give results in other screen as well.
    Aleksey Stukalov
    @aleksey-stukalov
    @sanchitbhavsar how did you add them and why do you conclude that you don't see them in IDEA?
    it is adding dependency for using QR code generator.
    sanchitbhavsar
    @sanchitbhavsar
    Hello,
    How to auto set the pk id on create ?
    sanchitbhavsar
    @sanchitbhavsar

    Hello,

    I am trying to update a record in dataGrid using dataGrid editorPostCommitListener, it works fine but for some records it throws validation exception.

    Caused by: javax.persistence.RollbackException: Exception [EclipseLink-7251] (Eclipse Persistence Services - 2.6.2.cuba15): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: The attribute [id] of class is mapped to a primary key column in the database. Updates are not allowed.

    Please Help, Urgent!!

    Ilia Rodionov
    @wrover
    Hello, guys, I'd like to clarify an issue - I am setting up CI/CD and we are using CUBA components, so our idea is of using Gradle version ranges. Like appComponent("com.acme:common-global:2.0.+"). With Gradle it works fine but Studio refuses to open project saying can't find an artifacts in repos or something like that. Any ideas?
    Lucio Rossi
    @eigen-value
    Hello Community!
    I have a quick one. Is it possibile to limit the options listed in the LookupField of an Enum attribute, (like having 2 different option lists in 2 different controllers)?
    Michal Hornák
    @expresado
    Guys any news regarding OSM in maps module ?
    pedrojr9119
    @pedrojr9119
    Hello everyone, I am adding new values in my CollectionDatasource programmatically in the screen controller postInit method, but the items are not in the same order as they were inserted into the CollectionDatasource. Is there a reason for this? I did not find anything related.
    Ivan I. Ovchinnikov
    @OVAnechka
    as far as i know, collectionDatasource is a Map so it doesn't have any ordering (as far as Java itself doesn't)
    pedrojr9119
    @pedrojr9119
    Thanks for help
    mortoza
    @mortoza
    @pedrojr9119 if it is a composite collection, you may set sorting order in the Entity definition of parent entity
    mortoza
    @mortoza
    Hi CUBA community: good news that CUBA app component team is working on idea construction of an awesome Gantt Chart component to be working with Cuba projects. Here is the link, if you like, please vote for higher attention.
    https://www.cuba-platform.com/discuss/t/twproject-gantt-component/3363
    If you want to have a look at the GanttChart I’m talking about, here is a demo : https://twproject.com
    Daniil Tsaryov
    @prozac631
    @wrover i'll check this case and reply soon
    @eigen-value i think that you can use setOptionsList(..)and setOptionsMap(..)methods of the LookupField component
    Daniil Tsaryov
    @prozac631
    @wrover probably, it will be implemented in the 7.0 version of CUBA Studio. Check an issue in YouTrack: link
    Daniil Tsaryov
    @prozac631
    @expresado are you talking about OpenStreetMap?
    Lucio Rossi
    @eigen-value
    @prozac631 found it, Thank you! ;)
    Ilia Rodionov
    @wrover
    @prozac631 , thank you.
    Ricky Yeung
    @Rickyycc
    @Override
    public void init(Map<String, Object> params) {
    String sql1 = sample1sDs.getQuery();
    System.out.println("sql 1 " + sql1);
    filterField.addValueChangeListener(e -> {
    String value = (String) e.getValue();
    if (!Strings.isNullOrEmpty(value)) {
    System.out.println("value1 : " + value);
    LogicalCondition orCondition = new LogicalCondition("", LogicalOp.OR);
    orCondition.getConditions().add(new Clause("", "e.rptDate = :(?i)custom$paramValue", null, null, null));
    QueryFilter queryFilter = new QueryFilter(orCondition);
    sample1sDs.setQueryFilter(queryFilter);
    sample1sDs.refresh(ParamsMap.of("paramValue", value ));
    String sql2 = sample1sDs.getQuery();
    System.out.println("sql2 " + sql2);
    } else {
    sample1sDs.setQueryFilter(null);
    sample1sDs.refresh();
    }
    });
    }
    I setup the above filter in pivot table but no effective.
    How to solve the above problem.
    electron36
    @electron36
    What are you trying to achieve.
    sandiemann
    @sandiemann
    Hello,
    I am trying to follow this: https://www.cuba-platform.com/discuss/t/dynamic-entities/366
    but the KeyValueCollectionDatasourceImpl class is not defined
    Ivan I. Ovchinnikov
    @OVAnechka
    hello. can you, please, help me creating a JPQL query for a datasource (from a controller) with parameters, which include doublequotes? E.g. myDs.setQuery("select e from sample$entity e where e.name = 'Ivan "OVAnechka" Ovchinnikov' or e.login = 'anonymous'"); of course it says that it has a confusing doublequote, so my question is how to avoid it in my syntax
    Shanur
    @shanurAnsari

    I have ExtUser entity with parent class User sec$User everything works fine.

    Now I would like to have validation for Email field which is in User [sec$User] entity(super class) and want to make it mandatory.

    How do I achieve this? because I want to send email with user name and password as soon as admin creates the user.

    Ivan I. Ovchinnikov
    @OVAnechka
    I think the simplest way is to add a property "required" to a needed field on an edit screen (you'll need to override he standard screen for this, obviously)
    Shanur
    @shanurAnsari
    After adding many-to-one relationship with user entity getting bellow error while updating the database
    Failed to execute: alter table SAAS_FIELD_REPORT_ENTRY add constraint FK_SAAS_FIELD_REPORT_ENTRY_REPORT_CREATEDUSER foreign key (REPORT_CREATEDUSER_ID) references SEC_USER(ID);
    create index IDX_SAAS_FIELD_REPORT_ENTRY_REPORT_CREATEDUSER on SAAS_FIELD_REPORT_ENTRY (REPORT_CREATEDUSER_ID);
    because: Impossible d'ajouter des contraintes d'index externe
    Lan Phan
    @lanphan

    hi all, I'm new to Cuba platform, but really interested in Report addon of Cuba platform here: https://github.com/cuba-platform/reports

    Is there any guideline to setup it quickly?

    Thanks

    hamzaoui haithem
    @haithemhamzaoui
    Hi, i'm a new membrr in cuba community. Hello everyone
    Oleg
    @Mazuruk-O
    Hi. Tell me please, I want to use java.util.Map as the entity field. Is it possible to create this in a designer? Or I need to prescribe in the code? I will be grateful for the link to the documentation or example)
    Aleksey Stukalov
    @aleksey-stukalov
    Hi there!
    Aleksey Stukalov
    @aleksey-stukalov
    @Mazuruk-O you can make it working using JPA converters and custom datatype https://doc.cuba-platform.com/manual-7.2/datatype_custom_example.html
    Oleg
    @Mazuruk-O
    thanks)
    Slawek Omylski
    @slawomir3_gitlab
    Hi, I'm trying to integrate a third-party plugin that requires a JavaScript snippet to be inserted in html body. Is this possible in CUBA? Or there a potential workaround if not?