Hi,
You can create an empty criteria and not had clauses, like this :
Criteria criteria = new Criteria();
Query query = QueryFactory.newQuery(SitBO.class, criteria);
-Message d'origine-
De : Robert S. Sfeir [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 4 février 2004 05:17
À : OJB Users
I saw that ojb do automatically create empty collections and set them to the
appropriate field even if they are empty.
In my own, case, this appears with nested objects, and thus it actually
creates the nested object despite the fact that it was null when i stored
the object.
Wouldn't it be
Easy: Issue a query where criteria using a null as criteria.
Best regards,
Edson Richter
- Original Message -
From: Robert S. Sfeir
To: OJB Users List
Sent: Wednesday, February 04, 2004 1:17 AM
Subject: Criteria with select with no where clause?
Can't seem to find a method which
Hennebelle wrote:
Hi,
You can create an empty criteria and not had clauses, like this :
Criteria criteria = new Criteria();
Query query = QueryFactory.newQuery(SitBO.class, criteria);
heh, thanks not real obvious.
R
-Message d'origine-
De : Robert S. Sfeir [mailto:[EMAIL PROTECTED]
I submit another patch that corrects my problem:
In AbstractPersistentField, lines 321 - 328 replace the code
String name = fieldName.substring(0, index);
PersistentField pField = createInternPersistentField(realClass,
name);
Object attrib =
I disagree that this is a proper decision in all cases. There are
semantic reasons why one would want an empty collection versus a null
instance. If this change is going to be made, the behavior should be
controlled by an attribute of the collection descriptor.
Thanks.
Larry.
Guillaume Nodet
Hi Jason,
Thank you very much for your fast reply.
The configuration you told me worked perfectly! Thanks. :-)
However, OJB seems a little bit slower when using oscache without
clustering as the cache implementation. Do you have that feeling too or am I
mistaken?
Thanks,
Jair
Folks,
The thing is I need to insert a record where for one of the fields I want to
omit value, not specify at all, not even null, nothing. So that in INSERT
operation it will not be present at all and will be populated by the default
value from database. Is there a way how I can do that?
Thank
Hi Sergey,
Manukyan, Sergey wrote:
Folks,
The thing is I need to insert a record where for one of the fields I want to
omit value, not specify at all, not even null, nothing. So that in INSERT
operation it will not be present at all and will be populated by the default
value from database. Is
Thanks Robert for replying.
Its a complex query (look in my first post) in the sense that it has
self joins based on logical operators (like greater than and less than).
Wasnt able to find anything in the documentation on how to accomplish that.
cheers M
Folks,
we are using the High/Low sequence manager implementation and we try to compute the id
in
advance with the following code :
PersistenceBroker broker = ((HasBroker) tx).getBroker();
Identity oid = new Identity(object, broker);
we encounter in the following error error :
I have an application (of which I have no control) where I should add
persistence for proxied objects. Now whenever I try to write such an
object I get this error:
org.apache.ojb.broker.PersistenceBrokerException: The InvocationHandler
for the provided Proxy was not an instance of
Hi,
Ziv Yankowitz wrote:
Folks,
we are using the High/Low sequence manager implementation and we try to compute the id in
advance with the following code :
PersistenceBroker broker = ((HasBroker) tx).getBroker();
Identity oid = new Identity(object, broker);
we encounter in the following error
Can you check that you are not passing null as example object into the query
[OjbExample.readAtributoId]?
- Original Message -
From: ANDRES FELIPE RINCON ZAPATA [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 11:25 PM
Subject: IllegarlArgumentException Error
Hi Armin,
If I declare this field as readonly, then it will be always readonly, but I
need to update on UPDATE operations, and omit on INSERT operations.
I guess the possible solution I am seeking for could be to declare something
like this:
field-descriptor
name=dateChanged
Another thing you can try is declare a second object to the same table...
So that in you code you need to check whether you want to use the default values then
you use this second object.
If you need to fill all columns you use the original object.
I have a table for persons which includes a
Simplest solution may be to change business logic. Since you want it to be writable
from OJB side, who said dateChanged should be
initially set by database? Sorry :-)
- Original Message -
From: Manukyan, Sergey [EMAIL PROTECTED]
To: 'OJB Users List' [EMAIL PROTECTED]
Sent: Wednesday,
Maybe I should give you my manager's phone number and you will explain it to
him ... ;) I think in anyway we should have a mechanism to control what
fields take part in operations.
Regards. Sergey.
-Original Message-
From: Andy Malakov [mailto:[EMAIL PROTECTED]
Sent: Wednesday,
Thank you Axel, I was thinking doing that if there is no other solution,
-Sergey
-Original Message-
From: Guerrero, Axel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 2:04 PM
To: OJB Users List
Subject: RE: insert object, and don't specify a value for one of the fields
Unfortunately my boss is not OK with this solution. Thank you in any case,
I will try to do per thread copying.
One more solution could be to mimic the functionality of database on OJB
level. That is to specify the default value that will be assigned to a field
at creation of the object. I could
Right now Proxy instances for database objects are created in several places inside
OJB and created instances are not customizable. It would be nice to be able to define
my own ProxyFactory or IndirectionHandlerFactory somewhere in OJB.properties.
For example: Some business methods can be
If use of default database values on insert is a common use case, it
would seem reasonable to submit an enhancement request to support some
specification in the class descriptor to support control of this semantic.
I don't know enough databases to know if this will be a problem in
implementing
hi andrew,
thanks for the patch. i commited the fix to the repository.
jakob
Andrew Geery wrote:
I recently upgraded from 1.0.rc4 to 1.0.rc5. This broke some code I had
written that used the method
org.apache.ojb.broker.query.Criteria.addSql(String). The SQL I added was
of the form:
Hi,
Everything is all right now, it seems that the test program
was unable to find the repository.
Bye
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
This is a repost. Could anybody help me on that?
Thanks,
Zhe
--- Zhe Liu [EMAIL PROTECTED] wrote:
-Original Message-
From: ZZZ Liu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 3:46 PM
To: [EMAIL PROTECTED]
Subject: Re: FW: setStartAtIndex/setEndAtIndex for a
Hi all,
I agree that it would be nice to have a declaration of initial and
default values, etc. in the repository.xml.
So we would need a little sub language that allows you to specify the
semantics you want. For simple cases it will be only constant of
arbitrary java types. For other cases
26 matches
Mail list logo