@kajibu Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
I fail to see the difference, but at the same time the Dutch smoke weed because its a privilege, not because its fun. So I'm wrong no matter what I say. Which is something I just laugh out loud at.
@Gimby Ey, listen. If you have a datasource that uses H2. Which is the Example one. Nothing else. Then please tell me, why I cannot remove the MSSQLDriver.
I'm the one who apparently thinks he makes better frameworks than everyone else because everyone else thinks premature optimization is the root of all evil.
Long story short: I want to use hibernate (link outdated; I am using 5.2.10 but the domain/hibernate is correct) for JPA (link generally is somewhat correct) to get a User from mah database. I put a query together and bang, nothing happens.
@geisterfurz007 yeah trying to figure out what someone has been trying to get to work by just trying stuff without really understanding how or why (respect that you manage to do what you've done) and seeing what happens without having access to the environment to see what has been done is rather limiting
There is an alternative which would be either use another frame work which would be against company standard or use a standard jdbc connection which would be ugly.
Use what works for now, (jdbc) so at least you'll have something working. In your free time, then, try making hibernate work. When the system is fully functioning, you can switch the platform (supposing you can just "switch" the platform, if the platform is highly decoupled).
@AMDG hibernate has an API with a way of configuring it and a set of classes to use it. JPA adds a sort of standardised layer on top of it which Hibernate also implements; two ways to achieve the same result, so to say. Wildfly provides JPA support through Hibernate and takes up several tasks on top of it, such as transaction management. All layers of an onion.
When you're an 18-yr-old like me who has more freetime than the man with the most vacation hours saved up, you can "Do it right the first time". If you're trying to push a product, or get a service working, and you need it done fast and ASAP, just get something working with the most optimal design you can come up with on the fly.
(I thought these frameworks were made for convenience, no? If it becomes an inconvenience, then it should be revisted later, and we should use what we already know to build a solution.)
In any case to answer your question, assuming it was directed at me, I worked on a marine insurance application that had this gruesome JPA model with bookings and booking lines where bookings had parent bookings and booking lines could refer to other types of booking lines, including those of parent bookings. It was such a mess of cross-wiring and cascaded persistence that I had to draw it all out just to be able to understand it each time I had to do tests with it
An ambigram is a word that looks the same from various orientations. For example, the word "swims" will be the same even when turned upside down. (source)
@AMDG that it was, after several years of patching it was pretty magical. You could feed it a "new truth" and the underlying model actually correctly did a tremendous amount of updates to the data model, including audit logging records.
but I feel sorry for the people who had to adopt that system after I left.
It doesn't sound like a very good system, though, at first glance. It sounds like makeshift work. Then again, I don't know enough about those systems to comment. Usually when you have 3rd party software trying to work together, it's like trying to make a team of three, individually speaking Japanese, Swahili, and French, altogether.
If I have an ArrayList <Integer> x, then x points to some location in memory. Does that location actually store the integers or references to Integer objects?
I wonder when I open the laptop tomorrow and this chat automatically appears in front of my eyes, what kind of tirade of not working things I am going to find and how hard the technology is blamed for it :)
It is my personal opinion that the easiest thing to do is: start over with the whole darn thing and work your way through it again making sure you understand every single action and commit that you took.
A system made by "just working without understanding" is a fragile system bound to fall apart in the future.
It gets worse the longer the system is in place too. The longer someone waits to rebuild the system, the worse it gets. The later it fails, the harder the failure. You forget things over time; and you don't even understand the system in the first place, so you have to start from scratch anyways.
I feel sorry for whoever would have to maintain the system that has been the discussion in this chat for the past two days after geis.
Everything is for the greater glory of God, which is what AMDG means.
Priests are meant to save souls. They are hard workers. All the things you hear about pedophiles in the Vatican are Novus Ordo priests, but still (hopefully validly ordained) priests nonetheless. They are just as capable of change as the layman who is labeled a pedophile.
The job of a father is to teach. We call Priests, Father. It is because he is a teacher. There really is no purpose in anything without God. That is why I say everyone knows nothing, but I can also say about anyone who knows God, "I know nothing, and I know everything." because all worldly knowledge is vain--nothingness, but God is everything, and to know God is to know everything.
therefore, I am saying, there ought to be less of me and more of them in the world, because you said, "I wish there were more like you in the world."
I should also mention that my business model will be a departure from the modern(ist) ideas. "I am Catholic before I am anything else," so I will indeed be discriminating. You will not get paid by the hour; you will get paid by the work, and the quality of it. If you are a public sinner, you will not work in my buildings. It is only just.
What about university assignments is daunting? They are not made to overwork you or make you do more than what you are capable of. They are meant for your benefit; that you may excel in learning, and receive a deeper understanding of what you are to study.
Grades have meant nothing to me, and they never will. You should work to the best of your ability; the grading system is not a reflection of your intelligence or abilities.
Do the work as best you can, and the grades will reflect that.
Do you have any more scruples?
Or do I need to reassure you more?
If you perform your work sheepishly and worry yourself about grades throughout your years of university and you live by the letter grade, you will not survive a week.
If you have a question, ask. My mentor is a procrastinator.
He went through years of college, and failed.
He went again, but this time, he raised his hand to make certain that he knew what was being taught.
He passed with an above average final score.
If you went to kindergarten right now, you wouldn't worry about your final letter grade, you would say, "This is easy; I could do it in my sleep!" That's because it is elementary work which you have full understanding of. If you match your understanding in the course, then you would say the same, but with a pupil's attitude, saying, "I am confident that I know this; I will do my best." That's all I have to say.
@Gimby I didn't understand why it wouldn't work in the beginning. I understand how my stuff works in general and it still is the same code as before. I deleted and reinstalled the wildfly and reconfigured the datasource and now it works.
By now I am bot even sure if it really was hibernate blocking or some other rubbish I wrote. In theory there was a logging statement when hibernate was done doing stuff which was never printed but there also was an infinite loop I built after the logging statement
@CrashBandicoot In general: Nej. At least from my experience there shouldnt be anything that isn't covered from general assignments I know you had in the past. At least at my college, the classes are built so that someone without any programming experience can follow. Then again it depends on how much time you are willing to invest.
What I found annoying were the tasks where you are restricted to stuff that has way better alternatives. Best example is doing something with an array instead of using a list. Or using stuff without generics.