Key
type
Required
Default
Description
entity
any
Yes
---
flush
boolean
No
false
transactional
boolean
No
From Property
Use Transactions or not
Key | Type | Required | Default | description |
query | string | Yes | --- |
params | any | No | --- |
max | numeric | No | 0 |
offfset | numeric | No | 0 |
flush | boolean | No | false |
transactional | boolean | No | From Property | Use transactions or not |
datasource | string | false | The datasource to use or use the default datasource |
These methods allow you to delete one or more entities in cascade style or bulk styles.
Deletes entities by using name value pairs as arguments to this function. One mandatory argument is to pass the 'entityName'. The rest of the arguments are used in the where class using AND notation and parameterized. Ex: deleteWhere(entityName="User",age="4",isActive=true);
This function returns numeric
Key
Type
Required
Default
Description
entityName
string
Yes
---
transactional
boolean
No
From Property
Use transactions not
Delete using an entity name and an incoming id, you can also flush the session if needed. The ID can be a single ID or an array of ID's to batch delete using hibernate DLM style deletes. The function also returns the number of records deleted.
No cascading will be done since the delete is done without loading the entity into session but via DLM HQL
This function returns numeric
Key
Type
Required
Default
Description
entityName
string
Yes
---
The name of the entity to delte
id
any
Yes
---
A single ID or array of IDs
flush
boolean
No
false
transactional
boolean
No
From Property
Use transactions not
Key
Type
Required
Default
Description
entityName
string
Yes
---
The entity to purge
flush
boolean
No
false
transactional
boolean
No
From Property
Use transactions or not