Skip to content

Tag: database

Hibernate: How to distinguish two uni-directional relationship and one bi-directional relationship?

in this answer, the author said: Take an example of two entities mapped without declaring a owning side: From a OO point of view this mapping defines not one bi-directional relation, but two separate uni-directional relations. 1.My first question is: Why it is not a bi-directional relation? Docs Oracle: In a bidirectional relationship, each entity has a relationship field or

How to generate .dot file using Schemacrawler

Using schemcrawler I’ve generated html file But I want to have an output in .dot file that contains diagram, node, graph, edge etc.. So how can I do it using my code or maybe some another way to do it with Java? Answer Simply change the output format from TextOutputFormat.html to DiagramOutputFormat.scdot. Sualeh Fatehi, SchemaCrawler

Working with multiple parameters in CriteriaBuilder

I have a need to use JpaSpecificationExecutor. Initially, I assumed that one parameter would be given as input and I would process it like this: CarRepository : However, I need to be able to work with: And in response to me came all the options for suitable machines. For example input: At the output, I want to get all the

Create a table “ca” as a statement using values of another tables but while inserting new values, the values of “ca” doesn’t change

I want to calculate turnover like in new table called ca ‘ I have tables article (idarticle, priceBuying, priceSale, quantity), and table command have (idarticle, quantity, dateSale), I want to calculate turnover automatically everyday and insert into ca , but the problem is when I insert new values into command the values of ca not updating using oracle db. Answer

Understanding how to model UML Class/Database

I’m confused with designing a client software with database integration to what should be a member variable of the class or just a query to the database. Let me be specific with a trivial example: If I have, lets say, a Student class, which has a list of “friends” that are Student objects. Should my software design have an ArrayList<Student>

How can you find out from spring cloud function that the connection you established to the database is closed?

In a spring cloud function usage, you don’t want your database connection to keep existing in the database. Once the spring cloud function finishes its process, is the following way to close the function appropriate? How do we validate if the spring cloud function inherently closes the connection even if we don’t do the implementation above? I saw the log