Closed kiclus closed 9 years ago
Anyway, is anyone fixing the deleteReservation method in ReservationController? If not, I will look at that... but first I need to get home, I'm still at work and they are going to banish me from these lands by 20.00 :cry:
I am already brain damaged so it was a safe bet.
I did not even know deleteReservation is broken so you can do it. My battery is running low, I will need break from java soon :)
Well, it works, but ... that bipas is ... eh, it needs to be fixed.
thank guys i own you big caps of bears. if is the reservationService.getReservationById(id) fix , in can only remove the bipas and it will be ok.. I wil look at it.
bipas is already removed in the currently versioned code :) If i did not forget to push it
yes he is removed in all function but it is still in deletereservation in reservationController
if you have removed it from delete and dot push it, please push :-D. or I will delete it
I fix it may I Push it??
I did not modify delete method. I am however still finishing edit and Roman said, I believe, that he would fix delete method, so I think that is all that that needs finishing on ReservationCOntoller.
ok I dont push it it is only remove the //bipas// inside the coment and one line after the bipas(redundant)
All right, I'm at dorm and ready to check the code. Please push all pending commits that you might have. If I find small errors, I will fix them directly (we don't have time to waste with issues, right?)
Finally. I think that my part is done.
ReservationController now supports both adding and editing.
Roman, you will fix delete method? Or how did we decide this?
Yes, I will (if you mean what I meant before :smiley:)
ok guye push it, after that I only add one think to validator because I have nothing here (reservation everything have in selection or ribonbutton) there aro nothing to validate , but il looks dum there are nothing in validator.
I removed that validator as it was not neccessary. I did tell you in the afternoon that I would finish your controller, so I made lot of changes, sorry :)
oh ok
Oh, I see. I wrote earlier that it's not really feasible, as these exceptions get wrapped in JpaSomethingException
(which is actually very interesting, as @Transactional
at service layer should wrap them into DataAccessException
) and unwrapping several layers of exception is not really a way to do things. I think we should simply display ex.getMessage()
(that's what I mean to do).
Can I change one word in CustomerController? I forgot to change one string from failure to success :D
Yeah, go ahead
Alright, done.
One more thing - as I'm not a native Czech speaker, I could have made some errors in messages. Would you please check all trip.* keys?
I do it, but I am not goot in language :-D
I meant @FiXerCz , but you can check the English version if you want :smirk:
Sure, I'll take a look at it :)
only datum/dátum fix I read it tooo late it si pushed
A quick curiosity: It is possible to create a trip with some excursions, then edit the excursion in such a way that it would happen before or after the trip.
Don't mind that, there is actually no easy way how to "fix" it except than freezing the date in the edit form, but bugger that I say :smiley:
EDIT: Actually, there is one. And rather easy, I will include it.
There 2 more untranslated words in Czech translation file. Already pushed it. Grammar seems ok.
That curiosity could be fixed probably by checking all trips that the excursion is part of when modifying that excursion. And comparing dates. Sound like a drag. I say, people working with our system must be responsible and not do reckless edits :smile:
This is exactly what I meant :smiley: And it's actually very short. But I'm checking your code now, mainly, I'm interested in that checkFormErrors
, that returns its second argument, which is then compared to null and returned :smiley:
Yeah, I was writing it in the dark times :D
Lol that is a crapload of horse shit. Should I fix or you want to do it yourself?
I am doing some edits in other codes, so I will fix it, I don't want to solve merge issues 5 minutes before deadline :smiley:
It should return true if there was some error (some boolean variable that would be defaultly false, if some of the 2 cycles would be iterated then it would be set to true and then returned). I was probably quite tired, when I was writing it :)
Really have no idea wy did I write it in this way...
So, it would always return true, as it is called under condition that there are some errors, right? The actual return type should be void
then...
RIght you are. I am not going to say anything else since it would probably again be wrong. It is too late in the night for me.. Anything you want to ask me should be mediated through my lawyer... As soon as I get one... :smile:
Update: I'm not asleep; I'm finalizing the last class (mainly I'm unifying error outputs and messages :smiley: + in some classes, some errors are not covered and the page would simply redirect to itself). Just 10 more minutes
Ok. Looks like it will be a close one with this milestone :-)
I'm done. One last test and I will commit it. Still have 10 minutes, I might make myself a tea :smiley:
Pushed, it compiles remotely. Now that I look at it, I wonder why there is nothing in "Main page", "About us" and god, those lame demo entities will haunt me this night :smiley: EDIT: Tried to run on the server, works "smoothly", errors are reported, I think we did it... :tada:
I program all day tehe next milestone, but now I have a problem and I can fix it now. it is the problem with colection im my reservation, every time I get this exception. org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: cz.muni.pa165.surrealtravel.entity.Reservation.excursions, could not initialize proxy - no Session org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) in some forum I find something but it doesn work in my code.http://stackoverflow.com/questions/11746499/how-to-resolve-failed-to-lazily-initialize-a-collection-of-role-exception In Trip There are colection to, Roman have you same problem like me???