Many to many relationship and UI

Hi,

I need a many to many relationship. I saw the Library example, but it isn’t run at my pc, because it can’t download some files from cuba. I get is this error:


Task 'deploy, start' failed
org.gradle.api.UncheckedIOException: Could not GET 'https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-desktop/6.4.2/cuba-desktop-6.4.2.pom'. Received status code 401 from server: Unauthorized

Can I get it manually?

So I have an Author and a Book entity. I made the same Many to many settings, but at the Author’s screen I get an error:


ClassCastException: org.eclipse.persistence.indirection.IndirectSet cannot be cast to com.haulmont.cuba.core.entity.Entity

On Author’s screen there is the old Many to One display. I attach a picture about it. I want the screen to display the datas like that.
I saw in Library project there is more settings in book-edit screen. So I guess the screens can’t automatic handle it. I wanted the Author screen to display the actual Author’s books.
I wanted to display in one column the books on Author’s browser screen. It is possible?

Thank you so much,
Carol

ManytoManyNow

Hi,

It must be temporary short outage of repo.cuba-platform.com. Could you try to open it again?

Please attach the stack trace of the exception, it may help us to reproduce the problem.

Hi, yes I tried a lots of time, and the same, but that isn’t the real problem. How can I display the many to many datas in one Column? Like an Author books?
It would be fine if I musn’t get into that row to see the actual Author’s books.

I tried again this is what I get:


:app-desktop:compileJava
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':app-desktop:compileClasspath'.
> Could not resolve com.haulmont.cuba:cuba-desktop:6.4.2.
  Required by:
      project :app-desktop
   > Could not resolve com.haulmont.cuba:cuba-desktop:6.4.2.
      > Could not get resource 'https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-desktop/6.4.2/cuba-desktop-6.4.2.pom'.
         > Could not GET 'https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-desktop/6.4.2/cuba-desktop-6.4.2.pom'. Received status code 401 from server: Unauthorized

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED

Total time: 2.404 secs
[10:55:00.176] Task 'deploy, start' failed
org.gradle.api.UncheckedIOException: Could not GET 'https://repo.cuba-platform.com/content/groups/work/com/haulmont/cuba/cuba-desktop/6.4.2/cuba-desktop-6.4.2.pom'. Received status code 401 from server: Unauthorized

Hi,

Could you share your build.gradle? I cannot figure out what is wrong: server outage or incorrect build script.

Of course, I shared here, will be it good for you? I guess that didn’t change much.

At the moment server is up and running and I don’t see anything strange. Did you set CUBA_PREMIUM_USER and CUBA_PREMIUM_PASSWORD environment variables to be able to run gradle CLI commands?

See also this answer: Target buildWar cannot resolve all dependencies Cuba 6.4 - CUBA.Platform

Yes, once I gave those, accidentally, and I just delete them, but I do not know how to make it unhappened. I didn’t use any gradle CLI commands.

Okay, let’s try to check server connectivity. It may be unavailable due to some network problems. If you use Studio 6.5 you can switch to the new Bintray repository, it is a highly available alternative to our hosted repository.

Could you try that?

bintray

Thank you, it works now, I updated my cuba, but now some icon is missing. I attached a photo about it, but except that i could run Library project, thanks!!

IconButtons

Try to press Ctrl+F5 in your browser or clear the browser cache.

1 Like

Thank you it works :slight_smile: