473,385 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hibenrtae :One-To-One Filter Applied, Non-Lazy Fetch Problem

Suppose i have one-to-one association between Product and ProductBasic. and we have applied filter on ProductBasic Class.
I have applied this filter as in Java side we have one-to-one relationship between Product and ProductBasic BUT at database side
we have one-to-many relationship between PRODUCT and PRODUCTBASIC. and we apply a condition (STARTTIME < CURRETTIME < ENDTIME)
while fetching PRODUCTBASIC, and this will always give me one record out of many.
So i have put this condition as filter in ProductBasic class.

In current hibernate, one-to-one associations are always non-lazily fetched. Moreover it doesn't apply filter conditions.
I understand that it can;t apply filter condition as some filter parameter must be provided at runtime and
user may not provide them (as he is not asking for ProductBasic)... Also in this case, proper proxy can't be created as
until we apply the filter criteria, we won't get one ProductBasic row (among many)..

I think hibernate code should be changed so that if a filter is declared on the associated class (ProductBasic in our case),
hibernate should return null for ProductBasic.
Jun 3 '09 #1
1 1670
r035198x
13,262 8TB
This is not the right place to post a change request for hibernate.
Jun 3 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable...
7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
3
by: bay_dar | last post by:
Hi my dirty word filter function has a problem, it is over restrictive. For instance the word "analysis" is ok, but the word "anal" is not. Any advice? code below: Public Function...
8
by: fonzie | last post by:
I have an edit button on my form that changes the recordsettype of the form, causing the form to requery. If I have a filter applied on the form before I hit the edit button, it is not applied to...
2
by: bobdydd | last post by:
Hi All Access 2007 I have a form with a ListBox called "ListContactTasks" DoubleClicking the ListBox opens another form called "frmContact" at a particular record corresponding to the one in...
1
by: AlexW | last post by:
Hi I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property. Basically what happens is this: -a...
0
by: elliott | last post by:
Hello, I'm trying to use a C# IHttpModule to install a Response filter however IIS keeps removing the Content-Encoding header from the response; but all the other headers I set stay intact. ...
4
by: Sheree | last post by:
I have some Access 2003 VBA code that looks like this: Private Sub SubName() Me.FilterOn = True Me.Filter = "" ' Me.FilterOn = False ' Me.Requery x = msgbox("Filter Cleared. Number of...
3
by: angi35 | last post by:
Working in Access 2000... I have a form with records for every employee. I'd like to create two command buttons so a user can filter the form for either 'only current' or 'only former' employees. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.