Skip to content
Advertisement

Tag: java

Where can I find documentation for Hibernate’s legacy hbm.xml mapping files?

I have joined a new team, and their project is using pretty much exclusively legacy-style Hibernate Mapping files (*.hbm.xml) for their Hibernate set-up. The current documentation pretty much seems to restrict itself to mention that Hibernate still supports hbm files and that they will take precedence over annotations. Can someone please provide a link to documentation that mainly deals with

SameSite cookie in Java application

Do you know any Java cookie implementation which allows to set a custom flag for cookie, like SameSite=strict? It seems that javax.servlet.http.Cookie has a strictly limited set of flags which can be added. Answer I am not a JEE expert, but I think that because that cookie property is a somewhat new invention, you cannot expect it to be present

Use a list of strings in IN clause with JDBI

I’m using JDBI / Dropwizard for a project and would like to run some simple queries. I have a query like so: private static final String GET_STUFF = “SELECT * FROM myTable WHERE state IN (:desiredState)” I bind the variable in my method like so: However, I get the following error when running: I’m passing in states as an ArrayList

toString method for a linkedList

I am getting strange output for my toString in my linkedList class. I cannot use any methods, only String concat. So limited in how to approach this. Here is the code: I wrote a JUnit test that: and that noOrderList().toString() comes from: When I run the test I get: Was is the cause of this , in the [, ]

One-to-many select in Jooq

I am trying out JOOQ and trying to select from 3 tables (Author, Books and Articles) using a join statement. The ERD is as follows: The query I have is the following: I also have a protobuf object as follows: (or any other pojo for that matter) which will hold all the entities (author details + list of books +

Advertisement