Hello Milosz
Thank you for reply.
You are right, in theory constant join may do what I need, but it would be
too painful for us to annotate all collection properties so verbose. We use
"deferred delete" for most of entities, and I have managed to modify
generated SQL by overriding a couple of DBDictionary methods, thanks to
OpenJPA extendable architecture.
MiĆosz Tylenda wrote:
>
> Konstantin,
>
> Maybe you could achieve a similar effect by using a "constant join". Have
> a look at the following section in the manual:
>
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_mapping_notes_nonstdjoins
>
> Regards,
> Milosz
>
>> Hello All
>>
>> We are migrating from Hibernate to OpenJPA and we faced the following
>> problem: it seems there is no alternative to Hibernate's @Where
>> annotation
>> for collection properties. This annotation allowed us to add arbitrary
>> SQL
>> for collections loading, e.g. @Where("IS_DELETED=0").
>> We used this to filter so called "marked as deleted" records.
>>
>> Could anybody suggest a way to filter collection when loading them from
>> database?
>> Using LRS will be too heavyweight solution for us.
>>
>> Thanks in advance.
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Restrict-collection-items-tp1690569p1690569.html
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://n2.nabble.com/Restrict-collection-items-tp1690569p1712342.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
|