Skip to main content
29 events
when toggle format what by license comment
Aug 2, 2020 at 13:04 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apr 4, 2020 at 13:01 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Dec 6, 2019 at 0:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Dec 23, 2016 at 9:25 comment added Nimesh I have doubt about your code. You have not set "manager_discount_id" for manager Id then why it is printing "storemanag0_.manager_discount_id" and not "manager_id"? I think your code is running something else.
Dec 23, 2016 at 8:08 comment added Hanumanthraju Added Bean class code
Dec 23, 2016 at 8:08 history edited Hanumanthraju CC BY-SA 3.0
added 736 characters in body
S Dec 23, 2016 at 8:06 history suggested richersoon CC BY-SA 3.0
Updated with complete repository code
Dec 23, 2016 at 7:57 answer added Kihats timeline score: 5
Dec 23, 2016 at 7:43 comment added Nimesh If possible copy your StoreManagers bean
Dec 23, 2016 at 7:33 comment added Hanumanthraju I have not done implementation as I'm using spring boot as for the spring boot documentation, entity class and repository interface extending the JpaRepository is enough to query the result..By the way i'm able to retrive the result by calling another method findByManagerId(String managerId). But i've only problem with findBystoreNumber method.
Dec 23, 2016 at 7:21 review Suggested edits
S Dec 23, 2016 at 8:06
Dec 23, 2016 at 7:21 comment added Nimesh Can you add implementation code of your method for better visibility?
Dec 23, 2016 at 7:19 comment added Hanumanthraju import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.transaction.annotation.Transactional; import com.searsgateway.model.StoreManagers; @Transactional(readOnly = true) public interface StoreManagersRepository extends JpaRepository<StoreManagers, String>{ List<StoreManagers> findByStoreNumber(String storeNumber); }
Dec 23, 2016 at 7:19 comment added Kiran Kumar Query looks good, can you post the repository code.
Dec 23, 2016 at 7:18 comment added Hanumanthraju final query with bind parameter value
Dec 23, 2016 at 7:17 comment added richersoon Can you post the repository code?
Dec 23, 2016 at 7:17 comment added Hanumanthraju Hi Kiran, select storemanag0_.manager_discount_id as manager_1_2_, storemanag0_.store_number as store_nu2_2_ from storemanagers storemanag0_ where storemanag0_.store_number=? 2016-12-23 12:16:15.763 TRACE 644 --- [nio-4000-exec-1] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [00012]
Dec 23, 2016 at 7:14 comment added Hanumanthraju passing same store number too
Dec 23, 2016 at 7:13 comment added Kiran Kumar Try running commit command directly and restart your app and check the results. Try printing the query after setting params.
Dec 23, 2016 at 7:12 comment added Hanumanthraju I'm using the same database and storeNumber, aslo i'm just reading the existing data from DB.
Dec 23, 2016 at 7:12 comment added JB Nizet And please, don't overwrite the edits I made if it makes the post look worse.
Dec 23, 2016 at 7:11 history edited Neil Stockton CC BY-SA 3.0
Spring Data JPA API != JPA API. As documentation says! There is no such "findBy" method in JPA API
Dec 23, 2016 at 7:11 history rollback JB Nizet
Rollback to Revision 2
Dec 23, 2016 at 7:11 comment added Mario Santini Please add the piece of code where you have the issue.
S Dec 23, 2016 at 7:10 history edited Hanumanthraju CC BY-SA 3.0
Format code and fix text
Dec 23, 2016 at 7:10 comment added JB Nizet Either you're not passing the same storeNumber, or you and the app are not using the same database, or the data you're seeing has been inserted but not committed yet.
Dec 23, 2016 at 7:09 review Suggested edits
S Dec 23, 2016 at 7:10
Dec 23, 2016 at 7:09 history edited JB Nizet CC BY-SA 3.0
added 6 characters in body
Dec 23, 2016 at 7:02 history asked Hanumanthraju CC BY-SA 3.0